mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
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:
parent
d483211677
commit
b0e45c1605
4 changed files with 4 additions and 4 deletions
|
@ -92,6 +92,7 @@ build:
|
||||||
|| echo 'nothing cached'
|
|| echo 'nothing cached'
|
||||||
docker build \
|
docker build \
|
||||||
--pull \
|
--pull \
|
||||||
|
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||||
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
|
--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):$(BRANCH_NAME)-deps \
|
||||||
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
|
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
|
||||||
|
|
|
@ -92,6 +92,7 @@ build:
|
||||||
|| echo 'nothing cached'
|
|| echo 'nothing cached'
|
||||||
docker build \
|
docker build \
|
||||||
--pull \
|
--pull \
|
||||||
|
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||||
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
|
--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):$(BRANCH_NAME)-deps \
|
||||||
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
|
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
|
||||||
|
|
|
@ -92,6 +92,7 @@ build:
|
||||||
|| echo 'nothing cached'
|
|| echo 'nothing cached'
|
||||||
docker build \
|
docker build \
|
||||||
--pull \
|
--pull \
|
||||||
|
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||||
--tag gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-deps \
|
--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):$(BRANCH_NAME)-deps \
|
||||||
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
|
--cache-from gcr.io/overleaf-ops/$(PROJECT_NAME):main-deps \
|
||||||
|
|
|
@ -474,16 +474,15 @@ IMAGE_CI ?= ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER)
|
||||||
IMAGE_REPO ?= gcr.io/overleaf-ops/$(PROJECT_NAME)
|
IMAGE_REPO ?= gcr.io/overleaf-ops/$(PROJECT_NAME)
|
||||||
IMAGE_REPO_BRANCH ?= $(IMAGE_REPO):$(BRANCH_NAME)
|
IMAGE_REPO_BRANCH ?= $(IMAGE_REPO):$(BRANCH_NAME)
|
||||||
IMAGE_REPO_MAIN ?= $(IMAGE_REPO):main
|
IMAGE_REPO_MAIN ?= $(IMAGE_REPO):main
|
||||||
IMAGE_REPO_MASTER ?= $(IMAGE_REPO):master
|
|
||||||
IMAGE_REPO_FINAL ?= $(IMAGE_REPO_BRANCH)-$(BUILD_NUMBER)
|
IMAGE_REPO_FINAL ?= $(IMAGE_REPO_BRANCH)-$(BUILD_NUMBER)
|
||||||
|
|
||||||
export SENTRY_RELEASE ?= ${COMMIT_SHA}
|
export SENTRY_RELEASE ?= ${COMMIT_SHA}
|
||||||
|
|
||||||
build_deps:
|
build_deps:
|
||||||
docker build --pull \
|
docker build --pull \
|
||||||
|
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||||
--cache-from $(IMAGE_REPO_BRANCH)-deps \
|
--cache-from $(IMAGE_REPO_BRANCH)-deps \
|
||||||
--cache-from $(IMAGE_REPO_MAIN)-deps \
|
--cache-from $(IMAGE_REPO_MAIN)-deps \
|
||||||
--cache-from $(IMAGE_REPO_MASTER)-deps \
|
|
||||||
--tag $(IMAGE_REPO_BRANCH)-deps \
|
--tag $(IMAGE_REPO_BRANCH)-deps \
|
||||||
--target deps \
|
--target deps \
|
||||||
--file Dockerfile \
|
--file Dockerfile \
|
||||||
|
@ -492,8 +491,6 @@ build_deps:
|
||||||
build_dev:
|
build_dev:
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg SENTRY_RELEASE \
|
--build-arg SENTRY_RELEASE \
|
||||||
--cache-from $(IMAGE_REPO_BRANCH)-deps \
|
|
||||||
--cache-from $(IMAGE_CI)-dev \
|
|
||||||
--tag $(IMAGE_CI) \
|
--tag $(IMAGE_CI) \
|
||||||
--tag $(IMAGE_CI)-dev \
|
--tag $(IMAGE_CI)-dev \
|
||||||
--target dev \
|
--target dev \
|
||||||
|
|
Loading…
Reference in a new issue