dockerjenkinsjenkins-pipelinedockerhubjenkins-docker

Docker cloud agent - Can I use local image instead of publishing to Docker hub


i was creating a Docker cloud agent template and I provided the image name from my local Docker. But I'm getting an error saying as below.

"pull access denied for agent, repository does not exist or may require 'docker login'"

Docker cloud agent template configuration

After going through many online answers, I realized that, it is trying to get that image from Docker Hub.

How can I refer to images which are available locally?

Thank you.


Solution

  • How can I refer to images which are available locally?

    Normally, nothing special is required. If the image is available locally, it will be used. However, note the setting:

    enter image description here

    Also note the ambiguity "locally". The docker image has to be available on the docker daemon that executes the docker image that the Jenkins server is connecting to.