Skip to content
Snippets Groups Projects

Use inline cache, BUILDKIT_INLINE_CACHE=1

Merged Bryan BRANCOTTE requested to merge base-r-buildkit into base-r
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -10,10 +10,10 @@ build:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
script:
# pull the latest example of shiny-k8s image
- docker pull "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:latest" || echo "Former image not found, carring on"
#- docker pull "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:latest" || echo "Former image not found, carring on"
# build the image while passing commit SHA and versions, and tagging the image with them
- docker build
--pull
--build-arg BUILDKIT_INLINE_CACHE=1
--cache-from "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:latest"
--tag "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:latest"
--tag "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHORT_SHA"
Loading