前提条件
- Docker Hub账号一个,注册地址:https://hub.docker.com/
- image一个(以下使用
novel
作为镜像)登录
docker login
[wujiawei@wujiaweideMacBook-Pro novel]# docker login Username: wujiawei0926 Password: Email: wujiawei0926@gmail.com WARNING: login credentials saved in /root/.docker/config.json Login Succeeded
推送
切换repo到个人账户
docker tag novel wujiawei0926/novel
推送
docker push wujiawei0926/novel
[wujiawei@wujiaweideMacBook-Pro novel]# docker push wujiawei0926/novel The push refers to repository [docker.io/wujiawei0926/novel] 7572a3dd4fde: Pushed 35c20f26d188: Pushed c3fe59dd9556: Pushed 6ed1a81ba5b6: Pushed a3483ce177ce: Pushed ce6c8756685b: Pushed 30339f20ced0: Pushed 0eb22bfb707d: Pushed a2ae92ffcd29: Pushed [DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.io registry NOW to avoid future disruption. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/ latest: digest: sha256:bce14e4e0ae5ac9a0a5da5b0120f57600d66424481d8f032d22b26dff1eda358 size: 10972
查看
登录docker hub,将会在仓库(https://hub.docker.com/repositories)中看到刚才推送的镜像