Pull existing container to aid build

If layers haven't changed, don't bother rebuilding them
This commit is contained in:
Jake Howard 2022-08-26 10:42:38 +01:00
parent ad255e813d
commit 8ab7e3d70e
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -53,6 +53,7 @@ build_container:
before_script: before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script: 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 build -t website --target production -t $IMAGE_TAG .
- docker push $IMAGE_TAG - docker push $IMAGE_TAG