jenkinsci / jenkinsci/docker-workflow-plugin
[JENKINS-43465] docker.run within a withRegistry block seems to use image.id instead of image.imageName()
- Dominant language
- Java
- Stars
- 527
- Forks
- 422
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
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
---
Originally reported by arty13, imported from: docker.run within a withRegistry block seems to use image.id instead of image.imageName()
jglick
Raw content of original issue
Same issue as
JENKINS-34276but with run command.
Jenkins ver. 2.46.1
docker-workflow ver. 1.10.0I'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
Contributor guide
Assessment
This issue has not been assessed yet.