Merge pull request #11908 from overleaf/jpa-fix-build-cache

[misc] fix building docker image with cache when using docker version 23+

GitOrigin-RevId: 3df64bfc888b324b255af4c3f3b3abd178504a33
This commit is contained in:
Jakob Ackermann 2023-02-21 09:07:08 +00:00 committed by Copybot
parent d483211677
commit b0e45c1605
4 changed files with 4 additions and 4 deletions

View file

@ -92,6 +92,7 @@ build:
|| echo 'nothing cached'
docker build \
--pull \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \

View file

@ -92,6 +92,7 @@ build:
|| echo 'nothing cached'
docker build \
--pull \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \

View file

@ -92,6 +92,7 @@ build:
|| echo 'nothing cached'
docker build \
--pull \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \

View file

@ -474,16 +474,15 @@ IMAGE_CI ?= ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
IMAGE_REPO ?= gcr.io/overleaf-ops/$(PROJECT_NAME)
IMAGE_REPO_BRANCH ?= $(IMAGE_REPO):$(BRANCH_NAME)
IMAGE_REPO_MAIN ?= $(IMAGE_REPO):main
IMAGE_REPO_MASTER ?= $(IMAGE_REPO):master
IMAGE_REPO_FINAL ?= $(IMAGE_REPO_BRANCH)-$(BUILD_NUMBER)
export SENTRY_RELEASE ?= ${COMMIT_SHA}
build_deps:
docker build --pull \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--cache-from $(IMAGE_REPO_BRANCH)-deps \
--cache-from $(IMAGE_REPO_MAIN)-deps \
--cache-from $(IMAGE_REPO_MASTER)-deps \
--tag $(IMAGE_REPO_BRANCH)-deps \
--target deps \
--file Dockerfile \
@ -492,8 +491,6 @@ build_deps:
build_dev:
docker build \
--build-arg SENTRY_RELEASE \
--cache-from $(IMAGE_REPO_BRANCH)-deps \
--cache-from $(IMAGE_CI)-dev \
--tag $(IMAGE_CI) \
--tag $(IMAGE_CI)-dev \
--target dev \