jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-37175] Tag image on another repository

Open
#431 0 comments 0 reactions 0 assignees View on GitHub
component:docker-workflow-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
527
Forks
422
Avg merge
10m
Merged PRs (30d)
1

Description

I would like to have an option to overwrite the imageName with regards to repository.

So I could do:

```
def image = docker.build("registry1.com/company/project:1")
image.push()
image.push("registry2.com/company/project:latest")
```

Current workaround would be (without building):

```
sh "docker tag -f registry1.com/compoany/project:1 registry2.com/company/project:latest"
sh "docker push registry2.com/company/project:latest"
```

---
Originally reported by hakamairi, imported from: Tag image on another repository


  • assignee: jglick
  • status: Open
  • priority: Minor
  • component(s): docker-workflow-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 3
  • imported: 2025-12-07

Raw content of original issue

I would like to have an option to overwrite the imageName with regards to repository.
So I could do:



def image = docker.build("registry1.com/company/project:1")

image.push()
image.push("registry2.com/company/project:latest")

Current workaround would be (without building):



sh "docker tag -f registry1.com/compoany/project:1 registry2.com/company/project:latest"

sh "docker push registry2.com/company/project:latest"

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.