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

Declarative Docker executors cannot pull from private docker repo

      I'm trying to use my executor in a declarative pipeline like this:

      agent {
        docker {
          image 'myartifacts-docker.jfrog.io/golang:1.11.2'
          args '--tmpfs /.cache'
          label 'universal'
          registryCredentialsId 'DECLARATIVE_JENKINS_PIPELINE_REGISTRY_CREDENTIALS_ID_FOR_ARTIFACTORY'
        }
      }

      I cannot get it to work.

      I know the credential referenced there (a username/password credential) is able to do a docker login on the command line.

      What am I doing wrong?

      I also tried setting

      registryUrl 'https://myartifacts-docker.jfrog.io' 

      but that didn't help either.

      I'm just getting errors like:

      Error response from daemon: Get https://myartifacts-docker.jfrog.io/v2/golang/manifests/1.11.2: unknown: Authentication is required

          [JENKINS-55231] Declarative Docker executors cannot pull from private docker repo

          Jon B created issue -
          Jon B made changes -
          Description Original: I'm trying to use my executor in a declarative pipeline like this:
          {code:java}
          agent {
            docker {
              image 'myartifacts-docker.jfrog.io/golang:1.11.2'
              args '--tmpfs /.cache'
              label 'universal'
              registryCredentialsId 'DECLARATIVE_JENKINS_PIPELINE_REGISTRY_CREDENTIALS_ID_FOR_ARTIFACTORY'
            }
          }{code}
          I cannot get it to work.

          I *know* the credential referenced there (a username/password credential) is able to do a docker login on the command line.

          What am I doing wrong?

          I also tried setting
          {code:java}
          registryUrl 'https://myartifacts-docker.jfrog.io' {code}
          but that didn't help either.

           

          I'm just getting errors like:
          {code:java}
          Error response from daemon: Get https://myartifacts-docker.jfrog.io/v2/golang/manifests/1.11.2: unknown: Authentication is required{code}
          New: I'm trying to use my executor in a declarative pipeline like this:
          {code:java}
          agent {
            docker {
              image 'myartifacts-docker.jfrog.io/golang:1.11.2'
              args '--tmpfs /.cache'
              label 'universal'
              registryCredentialsId 'DECLARATIVE_JENKINS_PIPELINE_REGISTRY_CREDENTIALS_ID_FOR_ARTIFACTORY'
            }
          }{code}
          I cannot get it to work.

          I *know* the credential referenced there (a username/password credential) is able to do a docker login on the command line.

          What am I doing wrong?

          I also tried setting
          {code:java}
          registryUrl 'https://myartifacts-docker.jfrog.io' {code}
          but that didn't help either.

          I'm just getting errors like:
          {code:java}
          Error response from daemon: Get https://myartifacts-docker.jfrog.io/v2/golang/manifests/1.11.2: unknown: Authentication is required{code}
          Nicolas De Loof made changes -
          Component/s New: docker-workflow-plugin [ 20625 ]
          Component/s Original: docker-plugin [ 18724 ]
          Nicolas De Loof made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]
          Jon B made changes -
          Summary Original: Docker executors in Declarative pipelines don't seem to work with Artifactory for some reason New: Declarative Docker executors cannot pull from private docker repo
          Andrew Bayer made changes -
          Component/s New: pipeline-model-definition-plugin [ 21706 ]
          Component/s Original: docker-workflow-plugin [ 20625 ]
          Component/s Original: pipeline [ 21692 ]

            Unassigned Unassigned
            piratejohnny Jon B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: