[JIRA] (JENKINS-41051) withRegistry is not doing a "docker login"
Title: Message Title Minh Thong Phan commented on JENKINS-41051 Re: withRegistry is not doing a "docker login" viresh doshi thanks, it work for me! Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.177787.1484260779000.1990.1564159560389%40Atlassian.JIRA.
[JIRA] (JENKINS-41051) withRegistry is not doing a "docker login"
Title: Message Title Jesse Glick resolved as Duplicate Already done. Jenkins / JENKINS-41051 withRegistry is not doing a "docker login" Change By: Jesse Glick Status: Open Resolved Resolution: Duplicate Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41051) withRegistry is not doing a "docker login"
Title: Message Title Michael Ermer updated an issue Jenkins / JENKINS-41051 withRegistry is not doing a "docker login" Change By: Michael Ermer Comment: Docker 1.17+ no longer supports ~/.dockercfg so jenkins needs to create ~/.docker/config.json from now on.https://github.com/moby/moby/commit/18c9b6c6455f116ae59cde8544413b3d7d294a5e Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41051) withRegistry is not doing a "docker login"
Title: Message Title Michael Ermer commented on JENKINS-41051 Re: withRegistry is not doing a "docker login" Docker 1.17+ no longer supports ~/.dockercfg so jenkins needs to create ~/.docker/config.json from now on. https://github.com/moby/moby/commit/18c9b6c6455f116ae59cde8544413b3d7d294a5e Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41051) withRegistry is not doing a "docker login"
Title: Message Title viresh doshi commented on JENKINS-41051 Re: withRegistry is not doing a "docker login" I can also confirm that this worked! I ended up using the following workaround: // code placeholder stage('Push image') { /* Finally, we'll push the image with two tags: * First, the incremental build number from Jenkins * Second, the 'latest' tag. */ withCredentials([usernamePassword( credentialsId: 'docker-hub-credentials', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { docker.withRegistry('', 'docker-hub-credentials') { sh "docker login -u ${USERNAME} -p ${PASSWORD}" myImage.push("${env.BUILD_NUMBER}") myImage.push("latest") } Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41051) withRegistry is not doing a "docker login"
Title: Message Title David Karr commented on JENKINS-41051 Re: withRegistry is not doing a "docker login" Note that I was able to implement a workaround, with a modified block like this: withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: params.JP_DockerMechIdCredential, usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) { usr = USERNAME pswd = PASSWORD } docker.withRegistry("http://ourhost:5100", params.JP_DockerMechIdCredential) { sh "docker login -u ${usr} -p ${pswd} http://ourhost:5100" def image = docker.build("com.att.sharedservices/tomee-uslmonitor") image.push 'latest' } Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-41051) withRegistry is not doing a "docker login"
Title: Message Title David Karr created an issue Jenkins / JENKINS-41051 withRegistry is not doing a "docker login" Issue Type: Bug Assignee: magnayn Components: docker-plugin Created: 2017/Jan/12 10:39 PM Environment: Linux Priority: Major Reporter: David Karr I have a block in my pipeline script like the following: docker.withRegistry("http://ourhost:5100", params.JP_DockerMechIdCredential) { def image = docker.build("com.att.sharedservices/tomee-uslmonitor") image.push 'latest' } Before this block of code, I extracted the username and password from the credential, and they are correct. In the log, I watched it build the image, tag it, but then when it tried to push it, it failed to authenticate. I didn't see a "docker login" command line in the log. I then tried to manually run the docker commands from the shell, on the same box the job is running on, starting with "docker login". That entire process worked. I then reran my job, and it also worked. I then moved my "~/.docker/config.json" file out of the way and reran my job, and it failed to authenticate again. It's just not attempting "docker login".