2023-10-03 18:31:33 +00:00
|
|
|
FROM rust:latest
|
2023-09-24 13:56:01 +00:00
|
|
|
|
2023-10-03 18:31:33 +00:00
|
|
|
ENV MAGICK_VERSION 7.1
|
2023-09-24 13:56:01 +00:00
|
|
|
|
2023-10-03 18:31:33 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get -y install wget curl build-essential clang pkg-config libjpeg-turbo-progs libpng-dev
|
2023-09-24 13:56:01 +00:00
|
|
|
|
2023-10-03 18:31:33 +00:00
|
|
|
RUN apt update && apt install curl -y \
|
|
|
|
&& curl https://imagemagick.org/archive/ImageMagick.tar.gz | tar xz \
|
|
|
|
&& cd ImageMagick-${MAGICK_VERSION}* \
|
|
|
|
&& ./configure --with-magick-plus-plus=no --with-perl=no \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -r ImageMagick-${MAGICK_VERSION}*
|
2023-09-24 13:56:01 +00:00
|
|
|
|
2023-10-03 18:31:33 +00:00
|
|
|
WORKDIR /app
|
2023-09-24 13:56:01 +00:00
|
|
|
|
2023-10-03 18:31:33 +00:00
|
|
|
RUN wget https://files.ivanch.me/api/public/dl/iFuXSNhw/small-image.png && \
|
|
|
|
wget https://files.ivanch.me/api/public/dl/81Bkht5C/big-image.png && \
|
2023-10-27 01:33:28 +00:00
|
|
|
wget https://files.ivanch.me/api/public/dl/nAndfAjK/video.mp4 && \
|
|
|
|
wget https://files.ivanch.me/api/public/dl/RzXwJG7o/nginx.html
|
2023-09-24 13:56:01 +00:00
|
|
|
|
2023-10-03 18:31:33 +00:00
|
|
|
COPY . .
|
2023-09-24 13:56:01 +00:00
|
|
|
|
2023-10-03 18:31:33 +00:00
|
|
|
RUN cargo build --release && \
|
|
|
|
cp ./target/release/ActixAPI . && \
|
|
|
|
mv small-image.png ./static && \
|
|
|
|
mv big-image.png ./static && \
|
|
|
|
mv video.mp4 ./static && \
|
2023-10-27 01:33:28 +00:00
|
|
|
mv nginx.html ./static && \
|
2023-10-03 18:31:33 +00:00
|
|
|
ldconfig /usr/local/lib
|
2023-09-24 13:56:01 +00:00
|
|
|
|
2023-10-03 18:31:33 +00:00
|
|
|
ENV LD_LIBRARY_PATH=/usr/local/lib
|
2023-09-24 13:56:01 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["./ActixAPI"]
|