1:登录docker hub 创建镜像仓库:

image.png

image.png

image.png

2:将把打好标签的docker镜像推送到docker hub仓库

终端登录docker hua并推送

  1. [root@docker nginx]# docker login
  2. 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.
  3. Username: liweiming0611
  4. Password:
  5. WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
  6. Configure a credential helper to remove this warning. See
  7. https://docs.docker.com/engine/reference/commandline/login/#credentials-store
  8. Login Succeeded
  9. [root@docker nginx]# docker push liweiming0611/nginx:v1.17.6
  10. The push refers to repository [docker.io/liweiming0611/nginx]
  11. a3da8c484666: Pushed
  12. aa247a060e5c: Pushed
  13. 556c5fb0d91b: Mounted from library/debian
  14. v1.17.6: digest: sha256:2d02aa9b8b49bb3c6b10cddde43a2ea2489ad635c260ff6edbaba7a1bf3e1460 size: 948
  15. [root@docker nginx]#

image.png

image.png