docker images REPOSITORY TAG IMAGE ID CREATED SIZE simon/basic_centos latest 3816db78c729 3 weeks ago 284MB
修改镜像名字
如果不知道怎么执行命令,可以先看看帮助文档。
1 2 3 4 5 6 7
docker tag "docker tag" requires exactly 2 arguments. See 'docker tag --help'.
Usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
修改名称
1
docker tag simon/basic_centos simon/basic-centos
删除旧镜像
我们再次查看一下镜像列表
1 2 3 4
docker images REPOSITORY TAG IMAGE ID CREATED SIZE simon/basic-centos latest 3816db78c729 3 weeks ago 284MB simon/basic_centos latest 3816db78c729 3 weeks ago 284MB