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.
This commit is contained in:
Peter Dave Hello 2023-08-23 23:04:29 +08:00 committed by GitHub
parent b14f64a9e1
commit f9a9cafd05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"]
ENTRYPOINT ["httpx"]