From f9a9cafd051d6ca6fe6741632927c4fb98cb5dda Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Wed, 23 Aug 2023 23:04:29 +0800 Subject: [PATCH] Remove additional `-U` for `apk` in Dockerfile There is no need to use `-U` with `--no-cache` when using `apk` on Alpine Linux, as using `--no-cache` will fetch the index every time and leave no local cache, so the index will always be the latest, without temporary files remain in the image. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 196ba43..bb93cdb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,8 @@ RUN go mod download RUN go build ./cmd/httpx FROM alpine:3.18.2 -RUN apk -U upgrade --no-cache \ +RUN apk upgrade --no-cache \ && apk add --no-cache bind-tools ca-certificates chromium COPY --from=builder /app/httpx /usr/local/bin/ -ENTRYPOINT ["httpx"] \ No newline at end of file +ENTRYPOINT ["httpx"]