From 40e5ab600908c92e30616620108aad7ed86636a0 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 28 Feb 2020 13:43:34 +0100 Subject: [PATCH] Dockerfile: don't use intermediate "deploy-source" stage The "deploy-source" stage was added in a previous refactor. While this stage is useful to "export" all docs (including archives if needed), and _convenient_ to collect all those files to the final stage, it caused a regression in performance. This patch changes the final ("deploy") to copy the "archives" and "current" docs separately, so that the archived versions can be cached in the final stage, and don't have to be copied again on each rebuild. Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8f8229ec1c..4b02c628ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,4 +110,6 @@ COPY --from=current /usr/share/nginx/html / # DOCKER_BUILDKIT=1 docker build -t docs --build-arg ENABLE_ARCHIVES=false . FROM deploybase AS deploy WORKDIR $TARGET -COPY --from=deploy-source / . + +COPY --from=archives / . +COPY --from=current /usr/share/nginx/html .