Answers: <p>Sounds like the docker image you are using doesn't have the correct name, or is stored in a private repository which requires login.</p>
  
  <p>Please post more information</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-12-14T07:47:07.213Z
Answers: thank you @adam yes that was the issue the credential I was giving incorrect credential from jenkins for docker.
Answers: user1555608
Answers: CC BY-SA 3.0
Answers: 2017-12-14T01:23:32.597Z
Answers: 2017-12-14T01:23:32.597Z
Answers: Adam
Body: <p>I have installed Jenkins and docker on the same machine Ubuntu.</p>
  
  <ul>
  <li>Ubuntu 17.10 </li>
  <li>Jenkins ver. 2.73.3</li>
  <li>Docker version 17.09.0-ce.</li>
  </ul>
  
  <p>I am trying to set up jenkins docker containers as slaves for running my automation test suite. </p>
  
  <p>I was able to correctly setup the docker plugin in Jenkins for spinning up docker containers and added a docker template with a image that I created for setting up docker environment.</p>
  
  <p>The image has been built on docker hosted in Ubuntu. </p>
  
  <p>Problem is now when I run a job from Jenkins. It gives an error message:</p>
  
  <blockquote>
    <p>(pending—Jenkins doesn’t have label docker-slave)</p>
  </blockquote>
  
  <p><img src="https://i.sstatic.net/CyqjQ.png" alt="Jenkins pending image"></p>
  
  <p>When I check the Jenkins logs in Ubuntu machine I see the following error message:</p>
  
  <pre><code>&gt; com.github.dockerjava.api.exception.NotFoundException: {"message":"pull access 
  denied, "message":may require 'docker login'"}
  </code></pre>
  
  <p>In the ubuntu machine, I have already given done docker login. </p>
  
  <p>The image that I am trying to build containers from is locally on ubuntu, not pushed to any repository, so why is trying to pull the image?</p>
  
  <p>Also, what is the permission issue that I need to resolve? When build a job from jenkins, it's the jenkins user building the container. Do I need to add something else there?</p>
  
Comments: CC BY-SA 3.0
Comments: 2018-01-08T22:11:31.483Z
Comments: Also having this issue. Not sure what it could be as I've tried auth with JNLP, SSH injection, SSH with the key directly pasted in, still geting the error with the label.
Comments: Wes Elliott
Tags: <docker><jenkins><jenkins2>
Title: docker as slave for jenkins
UserDisplayName: user1555608
ThreadText: # docker as slave for jenkins
  
  (Asked by: username_0 on 2017-12-12)
  
  I have installed Jenkins and docker on the same machine Ubuntu.
  
  * Ubuntu 17.10
  * Jenkins ver. 2.73.3
  * Docker version 17.09.0-ce.
  
  I am trying to set up jenkins docker containers as slaves for running my automation test suite.
  
  I was able to correctly setup the docker plugin in Jenkins for spinning up docker containers and added a docker template with a image that I created for setting up docker environment.
  
  The image has been built on docker hosted in Ubuntu.
  
  Problem is now when I run a job from Jenkins. It gives an error message:
  
  > (pending—Jenkins doesn’t have label docker-slave)
  
  ![Jenkins pending image](https://i.sstatic.net/CyqjQ.png)
  
  When I check the Jenkins logs in Ubuntu machine I see the following error message:
  
  ```
  > com.github.dockerjava.api.exception.NotFoundException: {"message":"pull access 
  denied, "message":may require 'docker login'"}
  
  ```
  
  In the ubuntu machine, I have already given done docker login.
  
  The image that I am trying to build containers from is locally on ubuntu, not pushed to any repository, so why is trying to pull the image?
  
  Also, what is the permission issue that I need to resolve? When build a job from jenkins, it's the jenkins user building the container. Do I need to add something else there?
  
  **Tags:** docker, jenkins, jenkins2
  
  > **Comments:**
  > **username_1**: Also having this issue. Not sure what it could be as I've tried auth with JNLP, SSH injection, SSH with the key directly pasted in, still geting the error with the label.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-12-14. Score: 1 | Accepted answer
  
  Sounds like the docker image you are using doesn't have the correct name, or is stored in a private repository which requires login.
  
  Please post more information
  
  > **Comments:**
  > **username_0**: thank you @username_2 yes that was the issue the credential I was giving incorrect credential from jenkins for docker.  
  
  ---
  
  