stenioc1
stenioc1

Reputation: 35

Rename Docker repository

I need to change the name of the Docker repository. For example...

ORIGINAL:

[root@docker ~]# docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE
registry.access.redhat.com/rhel7/rhel   latest              e64297b706b7        2 weeks ago         201MB

RENAMED:

[root@docker ~]# docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE
rhel                                    7.5                 e64297b706b7        2 weeks ago         201MB

Upvotes: 1

Views: 3037

Answers (1)

Leo K
Leo K

Reputation: 5354

You do not 'rename' images. What you see in docker images are tags. You can add a new tag or delete one, but not 'rename'. Try tagging your image with the new tag that you want and then (optionally), delete the old tag, e.g.:

docker tag registry.access.redhat.com/rhel7/rhel:latest rhel:7.5
docker rmi registry.access.redhat.com/rhel7/rhel:latest # remove old tag

Upvotes: 4

Related Questions