From bbe32c5bec087f5393529b5f9966792a51867cda Mon Sep 17 00:00:00 2001 From: Maik Ellerbrock Date: Mon, 11 Dec 2017 22:14:47 +0100 Subject: [PATCH] perf(dockerfile): move copy at the end to improve cache invalidation --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1e398c7..96ca66c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,6 @@ LABEL \ org.label-schema.url="https://dockerbench.com" \ 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 # https://github.com/gliderlabs/docker-alpine/issues/184 RUN \ @@ -17,6 +14,9 @@ RUN \ dumb-init && \ rm -rf /usr/bin/docker?* +COPY ./*.sh /usr/local/bin/ +COPY ./tests/*.sh /usr/local/bin/tests/ + WORKDIR /usr/local/bin ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ]