Contributing guidelines and issue reporting guide
Well-formed report checklist
Description of bug
Bug description
I'm trying to create a new cache with tag for each git branch when building the app in gitlab-ci with the docker executor.
With a gitlab-ci.yml snippet like below
variables:
DOCKER_TAG: "${CI_COMMIT_REF_SLUG}"
DOCKER_LOCAL_CACHE_DIR: "/srv/buildkit/${CI_PROJECT_ID}"
DOCKER_BUILD_OPTS: >
--cache-to type=local,dest=${DOCKER_LOCAL_CACHE_DIR},tag=${CI_COMMIT_REF_SLUG}
--cache-from type=local,src=${DOCKER_LOCAL_CACHE_DIR},tag=${CI_COMMIT_REF_SLUG}
build:docker:
image: docker:latest
stage: build
services:
- name: docker:dind
script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker build ${DOCKER_BUILD_OPTS} --tag ${CI_REGISTRY_IMAGE}:${DOCKER_TAG} .
- docker image push ${CI_REGISTRY_IMAGE}:${DOCKER_TAG}
variables:
DOCKER_HOST: tcp://docker:2376
The problem is that instead of creating a new entry in the index.json , the job just errors out
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1
System info
- Gitlab-CI runner , latest version (18.9.0-1) with docker executor
- Ubuntu 24.04 LTS
- Docker 29.2.1
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.31.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v5.0.2
Path: /usr/libexec/docker/cli-plugins/docker-compose
Contributing guidelines and issue reporting guide
Well-formed report checklist
Description of bug
Bug description
I'm trying to create a new cache with tag for each git branch when building the app in gitlab-ci with the docker executor.
With a gitlab-ci.yml snippet like below
The problem is that instead of creating a new entry in the index.json , the job just errors out
System info
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.31.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v5.0.2
Path: /usr/libexec/docker/cli-plugins/docker-compose