From 8ab7e3d70ecf3369c5eccc5ed82edcc7a687327a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 26 Aug 2022 10:42:38 +0100 Subject: [PATCH] Pull existing container to aid build If layers haven't changed, don't bother rebuilding them --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30961e3..61a8d2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,6 +53,7 @@ build_container: before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: + - docker pull $CI_REGISTRY_IMAGE:latest # Pull existing image to help with build caching - docker build -t website --target production -t $IMAGE_TAG . - docker push $IMAGE_TAG