Simplify apk command in Dockerfile

With apk `--no-cache` parameter, there is no need to run `apk update`
and manually clean up the cache, apk will update automatically without
leaving local cache files to be cleaned up.
This commit is contained in:
Peter Dave Hello committed 2021-06-16 22:47:33 +08:00
1 parent 3d7375be8b
commit 447bf77dfe
1 file changed
+2 -4
+2 -4
View File
@@ -1,7 +1,6 @@
FROM alpine:3.12 FROM alpine:3.12
RUN apk update -f \ RUN apk --no-cache add -f \
&& apk --no-cache add -f \
openssl \ openssl \
openssh-client \ openssh-client \
coreutils \ coreutils \
@@ -12,8 +11,7 @@ RUN apk update -f \
tzdata \ tzdata \
oath-toolkit-oathtool \ oath-toolkit-oathtool \
tar \ tar \
libidn \ libidn
&& rm -rf /var/cache/apk/*
ENV LE_CONFIG_HOME /acme.sh ENV LE_CONFIG_HOME /acme.sh
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.