Use apk --no-cache instead of apk --update
With `--no-cache`, we don't need to cleanup apk cache manually.
This commit is contained in:
1 parent
2095f787ac
commit
612ffd8e17
1 file changed
+2
-3
+2
-3
@@ -3,14 +3,13 @@ FROM alpine:3.10
|
||||
ENV DOCKER_VERSION 17.09.0-ce
|
||||
|
||||
# We get curl so that we can avoid a separate ADD to fetch the Docker binary, and then we'll remove it
|
||||
RUN apk --update add bash curl \
|
||||
RUN apk --no-cache add bash curl \
|
||||
&& cd /tmp/ \
|
||||
&& curl -sSL -O https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \
|
||||
&& tar zxf docker-${DOCKER_VERSION}.tgz \
|
||||
&& mv $(find -name 'docker' -type f) /usr/local/bin/ \
|
||||
&& apk del curl \
|
||||
&& rm -rf /tmp/* \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
&& rm -rf /tmp/*
|
||||
|
||||
COPY ./docker-gc /docker-gc
|
||||
|
||||
|
||||
Reference in new issue
Block a user