From 5ba9e7425a6ac9b59ff0f15e9c5b6f97b3de3bda Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Sat, 18 Oct 2025 23:05:53 +0800 Subject: [PATCH] Improve Dockerfile apk cache handling Drop the redundant apk update and cache removal commands in the runtime stage. The --no-cache flag already keeps the package index out of the layer, so the simplified instruction avoids needless work. --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6a3d7a39..a2d8ac41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,7 @@ RUN make install FROM alpine -RUN apk update && \ - apk add --no-cache openssl && \ - rm -rf "/var/cache/apk/*" +RUN apk add --no-cache openssl COPY --from=builder /root/.cargo/bin/monolith /usr/bin/monolith WORKDIR /tmp