Error response from daemon: pull access denied for TestDockerImage

Hitesh Bhandari picture Hitesh Bhandari · Dec 19, 2017 · Viewed 45.8k times · Source

I am new to docker and Jenkins2. I am trying to pull docker image from private docker repository.

pipeline {
         agent{
            docker{
                image "PrivateRepo/Test"
                args "--username testUser --password pass -v /var/jenkins_home/workspace:/home --env "
            }
        }
        stages {
                .
                .
                .
               }
 }

when I run Jenkins file it gives me below error

Error response from daemon: pull access denied for PrivateRepo/Test, repository does not exist or may require 'docker login'

Where do I give docker credential or how can I provide access to repository.

Answer

Deepak Gupta picture Deepak Gupta · Dec 10, 2019

Faced the similar problem while pulling the nginx image with command:

docker run --rm -p 8088:80 ngnix

Actualy, i was providing the wrong image name and it does not report for wrong image and displayed the above message.And hence after correcting the image name using command

docker run --rm -p 8088:80 nginx

It worked fine after this change.