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

Invalid fully qualified image name when registry URL specified.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: docker-commons-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.20
      OpenJDK 1.8.0_92
      docker-commons 1.5
      docker-workflow 1.9
    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            gliebowitz Greg Liebowitz created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-40962 [ JENKINS-40962 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: