jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-43465] docker.run within a withRegistry block seems to use image.id instead of image.imageName()

Open
#494 2 comments 0 reactions 0 assignees View on GitHub
component:docker-workflow-plugin imported-jira-issue priority:major resolution:unresolved
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()


  • assignee: jglick
  • status: In Progress
  • priority: Major
  • component(s): docker-workflow-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 2
  • imported: 2025-12-07

Raw content of original issue

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.