소스 검색

Use `--no-cache` `--upgrade` option in `apk add`

No need for separate upgrade / cache cleanup steps.

Signed-off-by: Kumiko as a Service <[email protected]>
Kumiko as a Service 1 개월 전
부모
커밋
63c8207d7a
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      Dockerfile

+ 1 - 3
Dockerfile

@@ -20,8 +20,6 @@ RUN set -ex \
 FROM --platform=$TARGETPLATFORM alpine AS dist
 FROM --platform=$TARGETPLATFORM alpine AS dist
 LABEL maintainer="nekohasekai <[email protected]>"
 LABEL maintainer="nekohasekai <[email protected]>"
 RUN set -ex \
 RUN set -ex \
-    && apk upgrade \
-    && apk add bash tzdata ca-certificates nftables \
-    && rm -rf /var/cache/apk/*
+    && apk add --no-cache --upgrade bash tzdata ca-certificates nftables
 COPY --from=builder /go/bin/sing-box /usr/local/bin/sing-box
 COPY --from=builder /go/bin/sing-box /usr/local/bin/sing-box
 ENTRYPOINT ["sing-box"]
 ENTRYPOINT ["sing-box"]