tcc/ActixAPI/Dockerfile

26 lines
635 B
Docker
Raw Normal View History

2023-09-24 13:56:01 +00:00
FROM rust:slim-bullseye AS build-env
WORKDIR /app
COPY . .
RUN apt update && apt install wget -y && \
wget https://files.ivanch.me/api/public/dl/iFuXSNhw/small-image.png && \
wget https://files.ivanch.me/api/public/dl/81Bkht5C/big-image.png && \
wget https://files.ivanch.me/api/public/dl/nAndfAjK/video.mp4 && \
mv small-image.png ./static && \
mv big-image.png ./static && \
mv video.mp4 ./static
RUN cargo build --release
FROM debian:bullseye-slim
WORKDIR /app
COPY --from=build-env /app/target/release .
COPY --from=build-env /app/static ./static
ENTRYPOINT ["./ActixAPI"]