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

withDockerRegistry problems in Declarative Pipeline

XMLWordPrintable

      Hello, 

      When i am using the pipeline like that 

       

      node('master')
      { withDockerServer([uri: "tcp://xxx.97.131.33:4243"]) {
       withDockerRegistry([credentialsId: 'xxx-docker', url: "https://xxx.got.xxx.net:18666/"]) {
       sh "docker images"
       }
       }
      }

       

      It worked, but if i try to user in the declarative pipeline
       

      stage ('Build container and push the image to repository') { agent any steps { script{ docker.withServer('tcp://xxx.97.131.33:4243') { docker.withRegistry('https://${DOCKER_REGISTRY}', 'xxxx-docker'){ image = docker.build "${PROJECT_NAME}:${BUILD_ID}", "--no-cache --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTP_PROXY} ." image.push() image.push('latest') } } } } }

       
      i got a timeout, like that
      $ docker login -u xxxx-qa -p ******** https://xxxx.got.xxx.net:18666WARNING! Using --password via the CLI is insecure. Use --password-stdin.
      Error response from daemon: <HTML><HEAD>
       

      I appreciate, if you can help me with that 

       

            Unassigned Unassigned
            sbj Junior Junior
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: