Skip to content

Commit 7714f10

Browse files
committed
shrink Docker image a little more
Signed-off-by: Lance-Drane <[email protected]>
1 parent 57ddc2f commit 7714f10

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ RUN cargo chef prepare --bin ${BIN_NAME} --recipe-path recipe.json
1515

1616
FROM chef AS builder
1717
ARG BIN_NAME
18-
RUN apt update -y && apt install -y --no-install-recommends \
18+
RUN apt-get update -qq && apt install -y --no-install-recommends \
1919
pkg-config \
2020
libssl-dev \
21-
&& rm -rf /var/lib/apt/lists/*
21+
&& apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
2222
COPY --from=planner /app/recipe.json recipe.json
2323
# Build dependencies - this is the caching Docker layer!
2424
RUN cargo chef cook --release --bin ${BIN_NAME} --recipe-path recipe.json
@@ -30,9 +30,9 @@ RUN cargo build --release --bin ${BIN_NAME}
3030
FROM debian:stable-slim AS runtime
3131
ARG BIN_NAME
3232
WORKDIR /app
33-
RUN apt update -y && apt install -y --no-install-recommends \
33+
RUN apt-get update -qq && apt install -y --no-install-recommends \
3434
ca-certificates \
35-
&& rm -rf /var/lib/apt/lists/*
35+
&& apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
3636
COPY --from=builder /app/target/release/${BIN_NAME} /app/bin
3737
ENV PROXYAPP_PRODUCTION="true"
3838
ENTRYPOINT ["/app/bin"]

0 commit comments

Comments
 (0)