为镜像创建新标签
为镜像创建新标签
为指定的镜像创建新标签 docekr tag 镜像id
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
charley/centos centos7 1ce28aeb6c15 30 minutes ago 204MB
charley/ubuntu v1 f2135bec3c53 16 hours ago 125MB
test/ubuntu v1 05443cf468db 20 hours ago 0B
ubuntu latest e34e831650c1 2 weeks ago 77.9MB
ubuntu 20.04 f78909c2b360 6 weeks ago 72.8MB
hello-world latest d2c94e258dcb 9 months ago 13.3kB
cha$ docker tag 1ce28aeb6c15 charley/centos:7
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
charley/centos 7 1ce28aeb6c15 31 minutes ago 204MB
charley/centos centos7 1ce28aeb6c15 31 minutes ago 204MB
charley/ubuntu v1 f2135bec3c53 16 hours ago 125MB
test/ubuntu v1 05443cf468db 20 hours ago 0B
ubuntu latest e34e831650c1 2 weeks ago 77.9MB
ubuntu 20.04 f78909c2b360 6 weeks ago 72.8MB
hello-world latest d2c94e258dcb 9 months ago 13.3kB