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

Credentials always points to https://index.docker.io/v1 even for private registry



    • Similar Issues:


      1. Try to use a private registry in the Image id/tag. eg:

      2. Setup the credentials for Docker registry credentials.

      3. Run the project

      It fails to pull the image
      Error: Status 403 trying to pull repository my-bucket/ubuntu: "

      {\"error\": \"Permission Denied\"}


      Look closer to the .dockercfg generated on the host: It's always: https://index.docker.io/v1


      { "auth": ".......", "email": "my-crediential" }}

      It seems in the plugin code that when it creates the registryEndpoint, it call with 'null' on URL:

      this.registryEndpoint = new DockerRegistryEndpoint(null, credentialsId);

      And the docker-common will use its default index.docker.io/v1 instead of the one defined in image tag.

      I'm not sure how it will work, it seems the code is setting up the credential first and then pull in the container image, so the image ID is never consulted when it tries to create the registryEndpoint, so it seems it will always be the default index.docker.io/v1.

      We are actually not using private registry, but a different public one, like quay.io, and it's not working because of this.

      I thought it's supported because it's coming from the help:

      ........ or the Docker image you have configured for this build do point to a private registry "docker.mycompany.com/my-bucket/ubuntu:secret-version" - either as an image ID or parent FROM reference in Dockerfile - then specify the registry credentials here so docker command line client is configured accordingly and can pull from this registry.
      (from CloudBees Docker Custom Build Environment Plugin)


          Issue Links


            ctlam Dominic Lam created issue -
            rtyler R. Tyler Croy made changes -
            Field Original Value New Value
            Workflow JNJira [ 169999 ] JNJira + In-Review [ 183721 ]
            ncgee Niek Geerts made changes -
            Component/s docker-commons-plugin [ 20628 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-38018 [ JENKINS-38018 ]
            jglick Jesse Glick made changes -
            Resolution Incomplete [ 4 ]
            Status Open [ 1 ] Resolved [ 5 ]
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-51406 [ JENKINS-51406 ]


              ndeloof Nicolas De Loof
              ctlam Dominic Lam
              2 Vote for this issue
              6 Start watching this issue