docker tag命令是用来给docker镜像打标签
docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
[root@centos79 ~]# docker tag --help
Usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
Aliases:
docker image tag, docker tag
[root@centos79 ~]#
命令:
docker tag nginx:latest nginx:1.0
[root@centos79 ~]# docker images | grep nginx
nginx latest 605c77e624dd 23 months ago 141MB
[root@centos79 ~]# docker tag nginx:latest nginx:1.0
[root@centos79 ~]# docker images | grep nginx
nginx 1.0 605c77e624dd 23 months ago 141MB
nginx latest 605c77e624dd 23 months ago 141MB
[root@centos79 ~]#