Managed runner not able to pull image from docker hub
Summary
I am trying to run docker inside docker to build docker image using managed runner, while doing so I am trying to pull image from docker hub. It fails to pull image from docker hub
Steps to reproduce
- You need a gitlab repository which host your code
- .gitlab-ci.yml file with job definition
- docker image tag
- commit to repository
.gitlab-ci.yml
build_image:
image: docker:20:10:17
services:
- docker:20.10.17-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- docker login -u $REGISTRY_USER -p $REGISTRY_PASS
script:
- docker build -t $IMAGE_NAME:$IMAGE_TAG .
- docker push $IMAGE_NAME:$IMAGE_TAG
Actual behavior
- The job fails with an error ->
ERROR: Job failed: failed to pull image "docker:20:10:17" with specified policies [always]: invalid reference format (manager.go:235:0s)
Expected behavior
Successful job run with docker image pushed to my GitLab repository
Relevant logs and/or screenshots
job log
*********
113Pulling docker image docker:20:10:17 ...
114WARNING: Failed to pull image with policy "always": invalid reference format (manager.go:235:0s)
115ERROR: Job failed: failed to pull image "docker:20:10:17" with specified policies [always]: invalid reference format (manager.go:235:0s)
Environment description
shared runners
Used GitLab Runner version
Running with gitlab-runner 15.2.0~beta.17.g34ae4a68 (34ae4a68)
2 on blue-5.shared.runners-manager.gitlab.com/default -AzERasQ
Edited by Jatin Mehrotra