Image cannot be pulled from gitlab registry using gitlab-ci.yml even with docker auth config variable. Pulling manually works
Summary
Using self-hosted Gitlab CE registry does not work when referencing images in a .gitlab-ci.yml
(ERROR: Preparation failed: no such image
). Pulling the image manually works. After pulling the image manually, it is found from the .gitlab-ci.yml
Steps to reproduce
- Follow the guides about enabling Gitlab Docker Registry
- Set up the Secret variable with the
DOCKER_AUTH_CONFIG
secret variable - Have the image on the gitlab registry (check that pulling it works)
- Use the image in a
.gitlab-ci.yml
Actual behavior
ERROR: Preparation failed: no such image
Expected behavior
The image is pulled.
Relevant logs and/or screenshots
- Docker auth config variable: https://puu.sh/uLp3C/4917939da7.png
- Image in registry: https://puu.sh/uLpm8/547d3eff95.png (link points to
$GITLAB_URL:4567/$GROUP/deploy:latest
) - Build failing:
Running with gitlab-ci-multi-runner 1.11.1 (a67a225)
on dev (9d565b47)
Using Docker executor with image $GIT_URL:4567/$GROUP/deploy:latest ...
ERROR: Preparation failed: no such image
Environment description
Content of config.toml
concurrent = 8
check_interval = 0
[[runners]]
name = "dev"
url = "$CI_URL"
token = "$TOKEN"
executor = "docker"
[runners.docker]
tls_verify = false
image = "$DEFAULT_IMAGE"
privileged = false
disable_cache = false
volumes = ["/cache"]
pull_policy = "never"
[runners.cache]
[[runners]]
name = "Docker builder"
url = "$CI_URL"
token = "$TOKEN"
executor = "docker"
[runners.docker]
tls_verify = false
image = "docker:latest"
privileged = true
disable_cache = false
volumes = ["/cache"]
[runners.cache]
Used GitLab Runner version
Running with gitlab-ci-multi-runner 1.11.1 (a67a225)