-
Bug
-
Resolution: Unresolved
-
Major
-
None
Same issue as JENKINS-34276
but with run command.
Jenkins ver. 2.46.1
docker-workflow ver. 1.10.0
I'm trying to execute a mysql container container (docker-all.registry.com/group/mysql:1.1.0):
node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def mysql = docker.image("group/mysql:1.1.0") mysql.pull() mysqlContainer = mysql.run() } }
It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0)
Abbreviated logs:
docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE
- is related to
-
JENKINS-47693 docker.withRun within a withRegistry block seems to use image.id instead of image.imageName()
-
- Open
-
- relates to
-
JENKINS-34276 docker.inside within a withRegistry block seems to use image.id instead of image.imageName()
-
- Resolved
-
[JENKINS-43465] docker.run within a withRegistry block seems to use image.id instead of image.imageName()
Description |
Original:
I'm trying to execute a maven build inside of my custom container (my.registry.com/build-env:jdk8-maven3): {code} node('docker') { docker.withRegistry('https://my.registry.com', 'docker-registry-login') { def maven = docker.image("my-build-env:jdk8-maven3") sh "echo ${maven.imageName()} -- ${maven.id}" maven.pull() maven.inside() { sh "echo Hello" } } } {code} It goes well until the pull, which uses the imageName (my.registry.com/build-env:jdk8-maven3) but the run command uses id (build-env:jdk8-maven3) Abbreviated logs: {code} Started by user Radesh Rao [Pipeline] Allocate node : Start Running on docker in /data/jenkins/workspace/My pipeline [Pipeline] node { [Pipeline] Set environment variables : Start [Pipeline] withEnv { [Pipeline] Sets up Docker registry endpoint : Start [Pipeline] withDockerRegistry { [Pipeline] sh [Cloud pipeline] Running shell script + echo my.registry.com/build-env:jdk8-maven3 -- build-env:jdk8-maven3 my.registry.com/build-env:jdk8-maven3 -- build-env:jdk8-maven3 [Pipeline] sh [Cloud pipeline] Running shell script + docker inspect -f . build-env:jdk8-maven3 Error: No such image or container: build-env:jdk8-maven3 [Pipeline] sh [Cloud pipeline] Running shell script + docker pull my.registry.com/build-env:jdk8-maven3 jdk8-maven3: Pulling from build-env fdd5d7827f33: Pulling fs layer // .... // snip // .... 416e801cfa37: Pull complete Digest: sha256:cadb8d0e48a2dc98d1c88f633b8ac226d5df00ffeaa66d3522b02dfdd055351b Status: Downloaded newer image for my.registry.com/build-env:jdk8-maven3 [Pipeline] Run build steps inside a Docker container : Start $ docker run -t -d -u 995:991 -w "/data/jenkins/workspace/My pipeline" -v "/data/jenkins/workspace/My pipeline:/data/jenkins/workspace/My pipeline:rw" -v "/data/jenkins/workspace/My pipeline@tmp:/data/jenkins/workspace/My pipeline@tmp:rw" -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** build-env:jdk8-maven3 cat [Pipeline] Run build steps inside a Docker container : End [Pipeline] } //withDockerRegistry [Pipeline] Sets up Docker registry endpoint : End [Pipeline] } //withEnv [Pipeline] Set environment variables : End [Pipeline] } //node [Pipeline] Allocate node : End [Pipeline] End of Pipeline java.io.IOException: Failed to run image 'build-env:jdk8-maven3'. Error: Unable to find image 'build-env:jdk8-maven3' locally docker: Error response from daemon: Authentication is required: Get https://registry-1.docker.io/v2/library/build-env/manifests/jdk8-maven3: unauthorized: incorrect username or password. See 'docker run --help'. at org.jenkinsci.plugins.docker.workflow.client.DockerClient.run(DockerClient.java:112) at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:145) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:136) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:113) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15) at org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:112) at org.jenkinsci.plugins.docker.workflow.Docker.node(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:63) at org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:104) at WorkflowScript.run(WorkflowScript:10) at org.jenkinsci.plugins.docker.workflow.Docker.withRegistry(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:38) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:55) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79) at sun.reflect.GeneratedMethodAccessor518.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:40) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:277) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:77) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:186) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:184) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Finished: FAILURE {code} |
New:
I'm trying to execute a maven build inside of my custom container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def maven = docker.image("group/mysql:1.1.0") maven.pull() mavenContainer = maven.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
Description |
Original:
I'm trying to execute a maven build inside of my custom container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def maven = docker.image("group/mysql:1.1.0") maven.pull() mavenContainer = maven.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
New:
Same issue as https://issues.jenkins-ci.org/browse/JENKINS-34276 but with run command. I'm trying to execute a maven build inside of my custom container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def maven = docker.image("group/mysql:1.1.0") maven.pull() mavenContainer = maven.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Description |
Original:
Same issue as https://issues.jenkins-ci.org/browse/JENKINS-34276 but with run command. I'm trying to execute a maven build inside of my custom container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def maven = docker.image("group/mysql:1.1.0") maven.pull() mavenContainer = maven.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
New:
Same issue as https://issues.jenkins-ci.org/browse/JENKINS-34276 but with run command. I'm trying to execute a maven build inside of my custom container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def mysql = docker.image("group/mysql:1.1.0") mysql.pull() mysqlContainer = mysql.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
Description |
Original:
Same issue as https://issues.jenkins-ci.org/browse/JENKINS-34276 but with run command. I'm trying to execute a maven build inside of my custom container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def mysql = docker.image("group/mysql:1.1.0") mysql.pull() mysqlContainer = mysql.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
New:
Same issue as https://issues.jenkins-ci.org/browse/JENKINS-34276 but with run command. [Jenkins ver. 2.46.1|http://jenkins-ci.org/] docker-workflow ver. 1.10.0 I'm trying to execute a maven build inside of my custom container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def mysql = docker.image("group/mysql:1.1.0") mysql.pull() mysqlContainer = mysql.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
Description |
Original:
Same issue as https://issues.jenkins-ci.org/browse/JENKINS-34276 but with run command. [Jenkins ver. 2.46.1|http://jenkins-ci.org/] docker-workflow ver. 1.10.0 I'm trying to execute a maven build inside of my custom container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def mysql = docker.image("group/mysql:1.1.0") mysql.pull() mysqlContainer = mysql.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
New:
Same issue as https://issues.jenkins-ci.org/browse/JENKINS-34276 but with run command. [Jenkins ver. 2.46.1|http://jenkins-ci.org/] docker-workflow ver. 1.10.0 I'm trying to execute a mysql container container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def mysql = docker.image("group/mysql:1.1.0") mysql.pull() mysqlContainer = mysql.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
Description |
Original:
Same issue as https://issues.jenkins-ci.org/browse/JENKINS-34276 but with run command. [Jenkins ver. 2.46.1|http://jenkins-ci.org/] docker-workflow ver. 1.10.0 I'm trying to execute a mysql container container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def mysql = docker.image("group/mysql:1.1.0") mysql.pull() mysqlContainer = mysql.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
New:
Same issue as but with run command. [Jenkins ver. 2.46.1|http://jenkins-ci.org/] docker-workflow ver. 1.10.0 I'm trying to execute a mysql container container (docker-all.registry.com/group/mysql:1.1.0): {code:java} node('docker') { docker.withRegistry('docker-all.registry.com', 'docker-registry-login') { def mysql = docker.image("group/mysql:1.1.0") mysql.pull() mysqlContainer = mysql.run() } } {code} It goes well until the pull, which uses the imageName (docker-all.registry.com/group/mysql:1.1.0) but the run command uses id (group/mysql:1.1.0) Abbreviated logs: {code:java} docker pull docker-all.registry.com/group/mysql:1.1.0 1.1.0: Pulling from group/mysql Digest: sha256:7ae17175553a57e3d9ae594745e0ea13e0fc025dee3ad957df2d6ad1b5cb1342 Status: Image is up to date for docker-all.registry.com/group/mysql:1.1.0 [Pipeline] sh [ager-Branch_SCR-505372-SCSS-RXII4SDT2AVJPSV6GFXFSPPDAHPZCGARWKDM6ZHFOFUTVSQ4OJ4Q] Running shell script + docker run -d group/mysql:1.1.0 Unable to find image 'group/mysql:1.1.0' locally docker: Error response from daemon: repository group/mysql not found: does not exist or no pull access. See 'docker run --help'. Finished: FAILURE {code} |
Link |
New:
This issue relates to |
For PR: https://github.com/jenkinsci/docker-workflow-plugin/pull/95