1:登录docker hub 创建镜像仓库:
2:将把打好标签的docker镜像推送到docker hub仓库
终端登录docker hua并推送
[root@docker nginx]# docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: liweiming0611
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[root@docker nginx]# docker push liweiming0611/nginx:v1.17.6
The push refers to repository [docker.io/liweiming0611/nginx]
a3da8c484666: Pushed
aa247a060e5c: Pushed
556c5fb0d91b: Mounted from library/debian
v1.17.6: digest: sha256:2d02aa9b8b49bb3c6b10cddde43a2ea2489ad635c260ff6edbaba7a1bf3e1460 size: 948
[root@docker nginx]#