perf(dockerfile): move copy at the end to improve cache invalidation

This commit is contained in:
Maik Ellerbrock 2017-12-11 22:14:47 +01:00
parent be2a7b6b6e
commit bbe32c5bec
No known key found for this signature in database
GPG key ID: AC6B0B8B492B04CA

View file

@ -5,9 +5,6 @@ LABEL \
org.label-schema.url="https://dockerbench.com" \ org.label-schema.url="https://dockerbench.com" \
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git" org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"
COPY ./*.sh /usr/local/bin/
COPY ./tests/*.sh /usr/local/bin/tests/
# Switch to the HTTPS endpoint for the apk repositories # Switch to the HTTPS endpoint for the apk repositories
# https://github.com/gliderlabs/docker-alpine/issues/184 # https://github.com/gliderlabs/docker-alpine/issues/184
RUN \ RUN \
@ -17,6 +14,9 @@ RUN \
dumb-init && \ dumb-init && \
rm -rf /usr/bin/docker?* rm -rf /usr/bin/docker?*
COPY ./*.sh /usr/local/bin/
COPY ./tests/*.sh /usr/local/bin/tests/
WORKDIR /usr/local/bin WORKDIR /usr/local/bin
ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ] ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ]