重命名Docker存储库

问题描述 投票:0回答:1

我需要更改Docker存储库的名称。例如...

原版的:

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

改名为:

[root@docker ~]# docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE
rhel                                    7.5                 e64297b706b7        2 weeks ago         201MB
docker docker-repository
1个回答
1
投票

您没有“重命名”图像。你在docker images看到的是标签。您可以添加新标签或删除一个标签,但不能“重命名”。尝试使用您想要的新标记标记您的图像,然后(可选)删除旧标记,例如:

docker tag registry.access.redhat.com/rhel7/rhel:latest rhel:7.5
docker rmi registry.access.redhat.com/rhel7/rhel:latest # remove old tag
© www.soinside.com 2019 - 2024. All rights reserved.