From 38fced43550b9b799ebe42c1f9fb65a8b46b94e9 Mon Sep 17 00:00:00 2001 From: Dmitry <b4tm4n@mail.ru> Date: Sat, 8 Mar 2025 18:05:15 +0300 Subject: [PATCH] upd Dockerfile --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f12ccf..e1d1572 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1-alpine AS chef +FROM docker.io/library/rust:1-alpine AS chef RUN apk add --no-cache musl-dev RUN cargo install cargo-chef WORKDIR /app @@ -15,7 +15,9 @@ RUN cargo chef cook --release --recipe-path recipe.json COPY . . RUN cargo build --release -FROM alpine AS runtime -WORKDIR /app -COPY --from=builder /app/target/release/cr-web-test /usr/local/bin -ENTRYPOINT ["/usr/local/bin/cr-web-test"] \ No newline at end of file +FROM scratch AS runtime +WORKDIR / +COPY --from=builder /app/target/release/cr-web-test / +ENV ROCKET_ADDRESS 0.0.0.0 +ENV ROCKET_PORT 80 +ENTRYPOINT ["/cr-web-test"]