I’m using kaniko to build a docker image and upload it to my self-hosted GitLab’s registry. This works fine, but as soon as I’m pushing a tag containing the character /
, like ubuntu-20-04/2023-11-01
, the process fails very early with the following error:
error checking push permissions – make sure you entered the correct tag name, and that you are authenticated correctly, and try again: getting tag for destination: repository can only contain the characters
abcdefghijklmnopqrstuvwxyz0123456789_-./
: software/docker-image-tests:ubuntu-20-04/2023-11-01
The GitLab instance is on v16.5.0 on Ubuntu Server 22.04 and the runner is on v16.4.1 on Arch Linux.
The .gitlab-ci.yml looks like this:
build:
stage: build
tags:
- linux-x64
image:
name: gcr.io/kaniko-project/executor:v1.14.0-debug
entrypoint: [""]
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
When pushing the tag ubuntu-20-04-2023-11-01
, the image is built correctly. So it’s clearly related to the character /
in the tag name. However, the error message itself states that this character is allowed to use, so this is rather confusing.
Any ideas?