Feature request: `docker retag`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
As a developer of docker images, I want to be able to retag an image that is in my remote repo as a pure metadata operation instead of requiring a full pull and repush. This is especially needed in CI/CD environments pipeline which generally follow these steps:
- In each feature branch commit, the ci/cd pipeline creates builds tests and finally pushes incremental updates with a new commit hash label or under a new build number.
- In the case that the docker image has not changed but a commit is being promoted to master, the image tag will be pulled down, retagged as
latestor similar and then repushed back to the repository.
The push back to the repo will take no significant time since all layers are already there, but the pull takes many minutes, depending upon the size of the image, and can be up to 20 or 30 minutes for large images.
- Note: there are some hacky solutions to this which require interacting with the https REST API directly, but they are not accessible to a broad audience or as any type of standard library.
Steps to reproduce the issue:
(See above)
Describe the results you received:
(See above)
Describe the results you expected:
Since all layers are already on the remote repo, users with push access should also have retag ability, in which case only the metadata of the image tag needs to be downloaded, updated and re-pushed to the remote repository.
Additional information you deem important (e.g. issue happens only occasionally):
n/a
Output of docker version:
n/a (all versions)
Output of docker info:
n/a (all versions)
Additional environment details (AWS, VirtualBox, physical, etc.):
n/a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by locating the Docker CLI's image-tag command handling and its registry REST API integration, then determine the supported remote retag flow and its authentication and registry constraints. Done means users with push access can retag a remote image without pulling or repushing its layers, with coverage for the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100