3

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

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?

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. Jan 8, 2018 at 22:11

1 Answer 1

1

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

1
  • thank you @adam yes that was the issue the credential I was giving incorrect credential from jenkins for docker. Dec 14, 2017 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.