docker login #登录,若成功会出现Login Succeeded docker images #查看hello-world镜像,准备打包 docker tag hello-world:latest jingjingwin5/test-hello-world:1 #重新打包镜像名称和标签 docker push jingjingwin5/test-hello-world:1 #推送,出现sha256码则成功
注:重新打包的hello-world镜像的镜像ID和之前是一样的,说明是同一个源文件,如果以名称删除并不会影响到hello-world:last镜像。
docker rmi jingjingwin5/test-hello-world:1 #删除本地镜像 docker pull jingjingwin5/test-hello-world:1 #拉取远程镜像 docker logout #退出登录