1. 修改tag
在自己的机器上修改本地仓库的一个镜像的 tag
格式:docker tag 本地镜像名 远程仓库名
docker tag nginx:latest liuxue001/test:nginx
2. 本地登录Docker Hub
docker login
3.推送镜像到Docker Hub
[root@bogon ~] docker push liuxue001/test:nginx
The push refers to repository [docker.io/liuxue001/test]
64ee8c6d0de0: Layer already exists
974e9faf62f1: Layer already exists
15aac1be5f02: Layer already exists
23c959acc3d0: Layer already exists
4dc529e519c4: Layer already exists
7e718b9c0c8c: Layer already exists
nginx: digest: sha256:42bba58a1c5a6e2039af02302ba06ee66c446e9547cbfb0da33f4267638cdb53 size: 1570
4.登录Docker Hub就可以看到
5.拉取Docker Hub远程镜像到本地
docker push liuxue001/test:tagname
6.从本地退出Docker Hub
docker logout