Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39181

Invalid fully qualified image name when registry URL specified.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • docker-commons-plugin
    • None
    • Jenkins 2.20
      OpenJDK 1.8.0_92
      docker-commons 1.5
      docker-workflow 1.9

      This issue was discovered in the docker-workflow-plugin, which has a dependency on docker-commons-plugin.
      Given the following pipeline code:

      docker.withRegistry('http://localhost:5000/') {
         def dockerImage = docker.image('localhost:5000/test-image')
            dockerImage.inside {
               echo "container running on ${port}"
            }
      }
      

      The rendered "docker pull" command incorrectly formats the qualified image name as:
      localhost:5000/localhost:5000/test-image

      I have submitted a PR that adds a condition to check whether or not the image name already contains the registry prefix to avoid appending again.

      https://github.com/jenkinsci/docker-commons-plugin/pull/56

            Unassigned Unassigned
            gliebowitz Greg Liebowitz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: