reduce Docker image size

This commit is contained in:
Denis-Cosmin Nutiu 2025-01-03 23:03:56 +02:00
parent 0ed0f0dc1f
commit 90a6a03890
2 changed files with 6 additions and 2 deletions

View file

@ -23,9 +23,11 @@ COPY . .
RUN cargo build --profile release RUN cargo build --profile release
# Run the project # Run the project
FROM rust:1.83.0-bookworm AS runner FROM debian:bookworm-slim AS runner
WORKDIR /app WORKDIR /app
RUN apt-get update && apt-get -y install libssl3
COPY --from=builder /app/target/release/bot /app/bot COPY --from=builder /app/target/release/bot /app/bot
ENTRYPOINT ["/app/bot"] ENTRYPOINT ["/app/bot"]

View file

@ -23,9 +23,11 @@ COPY . .
RUN cargo build --profile release RUN cargo build --profile release
# Run the project # Run the project
FROM rust:1.83.0-bookworm AS runner FROM debian:bookworm-slim AS runner
WORKDIR /app WORKDIR /app
RUN apt-get update && apt-get -y install libssl3
COPY --from=builder /app/target/release/scrapper /app/scrapper COPY --from=builder /app/target/release/scrapper /app/scrapper
ENTRYPOINT ["/app/scrapper"] ENTRYPOINT ["/app/scrapper"]