From e7b83389325cb1151ed279a2260b7d94427fc7ed Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Date: Fri, 25 Jul 2025 14:06:10 +0330 Subject: [PATCH] Add docker build cache to gitlab CI --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee54b97..194ab57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ docker-build: # All branches are tagged with $DOCKER_IMAGE_NAME (defaults to commit ref slug) # Default branch is also tagged with `latest` script: - - docker build --pull -t "$DOCKER_IMAGE_NAME" . + - docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $CI_REGISTRY_IMAGE:latest --pull -t "$DOCKER_IMAGE_NAME" . - docker push "$DOCKER_IMAGE_NAME" - | if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then