tcc/ActixAPI/Dockerfile

25 lines
602 B
Docker
Raw Normal View History

2023-09-13 00:39:28 +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/Dj0gkp-m/small-image.png && \
wget https://files.ivanch.me/api/public/dl/FqHEPM1Q/big-image.png && \
wget https://files.ivanch.me/api/public/dl/nTAYqZwD/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 .
ENTRYPOINT ["./ActixAPI"]