upd Dockerfile

This commit is contained in:
Dmitry Belyaev 2025-03-08 18:05:15 +03:00
parent eaea3f906c
commit 38fced4355
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

@ -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"]
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"]