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

Docker Commons/Pipeline upgrade breaks build jobs

      Two days ago, we upgraded docker-commons from 1.11 to 1.12 and docker-workflow from 1.15.1 to 1.16 - and our jobs stopped working. Reverting the two plugins makes jobs build again.

      The setup is a bit complicated: The Jenkins master is running on a Debian Stretch machine, but the build nodes are running on the same machine as Docker containers using the plugin simply named Docker.

      As the Docker daemon is running outside the Docker container with the build node, I use a construct like the following to handle Docker commands:

      withEnv(["DOCKER_HOST=$\{DOCKER_HOST}"]) {
        docker.withRegistry("https://${DOCKER_REPO}", 'artifactory-api-key') {
          dockerImage.push("${currentBuild.number}")
          dockerImage.push('latest')
        }
      }

      This has worked fine for a long time, but with the above mentioned upgrade, it started failing with error messages like

      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] withDockerRegistry$ docker login -u jenkins -p ******** https://${DOCKER_REPO}
      WARNING! Using --password via the CLI is insecure. Use --password-stdin.
      Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: 
       https://index.docker.io/v1/
      Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
      [Pipeline] // withDockerRegistry
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      

      Reverting the two plugins to the previous versions solves the problem.

      Regards,
      Lars

          [JENKINS-51294] Docker Commons/Pipeline upgrade breaks build jobs

          I think the first warning ("WARNING! Using --password via the CLI is insecure. Use --password-stdin.") should be irrelevant.

          My Jenkins collector is also a Docker host, so I don't have/need/use your withEnv(["DOCKER_HOST=$\{DOCKER_HOST}"]) { approach and this seems to work fine.

          Is this really still an issue?

          Reinhold Füreder added a comment - I think the first warning (" WARNING! Using --password via the CLI is insecure. Use --password-stdin. ") should be irrelevant. My Jenkins collector is also a Docker host, so I don't have/need/use your withEnv( ["DOCKER_HOST=$\{DOCKER_HOST}"] ) { approach and this seems to work fine. Is this really still an issue?

          I wouldn't know it this is still an issue: It's a 3 year old bug report, and I'm not even working with the company from which I reported this error anymore. Almost all components in this bug have been updated since then.

          I think this bug should be closed as unresolved due to inattention.

          Lars Skjærlund added a comment - I wouldn't know it this is still an issue: It's a 3 year old bug report, and I'm not even working with the company from which I reported this error anymore. Almost all components in this bug have been updated since then. I think this bug should be closed as unresolved due to inattention.

            Unassigned Unassigned
            larsskj Lars Skjærlund
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: