Skip to content

Image retag function #5778

@cd1989

Description

@cd1989

Is your feature request related to a problem? Please describe.

For the moment, if I want to retag an image in Harbor with another tag, the only way seem to executing:

  • docker pull ...
  • docker tag ...
  • docker push ...

This is very insufficient to pull a large image, it's more reasonable to achieve retag within the Harbor.

There are several scenarios when user may want to retag an image:

  1. Retag fully tested images from stage project to product project
  2. Retag a latest dated tag to latest, for example, app:201809011830 --> app:latest
  3. ...

Describe the solution you'd like

Harbor can provide an API to support retag an image, and may also to support it in UI. Then user can:

  • Create new tag for an image
  • Move images across projects within Harbor

Describe the main design/architecture of your solution

POST /api/retag

{
    "src_image": "stage/app:v1.0",
    "dest_image": "product/app:v1.0"
}

User can retag images to other project, or repo as long as it's permitted

For retag, there is no layer data transfer, so it should be efficient enough.

Describe the development plan you've considered

I'd like this can be achieved in v1.6.0. I will make a PR soon if it's accepted.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

kind/requirementNew feature or idea on top of harbor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions