dockerhub
注册 hub.docker.com
账号可以登陆
在服务器上提交自己的镜像

[root@localhost ~]# systemctl start docker
[root@localhost ~]# docker login -u lingluanaishitou Lingluan521
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@localhost ~]#[root@localhost ~]# docker push diytomcat
Using default tag: latest
The push refers to repository [docker.io/library/diytomcat]
2204d5a44119: Preparing
f56faf184908: Preparing
c2fedf6d2918: Preparing
67f1ba4dbf6a: Preparing
#
[root@localhost ~]# docker push lingluanaishitou/diytomcat:1.0
 #接连几次出错
 [root@localhost ~]# docker push lingluanaishitou/diytomcat
Using default tag: latest
The push refers to repository [docker.io/lingluanaishitou/diytomcat]
An image does not exist locally with the tag: lingluanaishitou/diytomcat
tag 添加上信息
[root@localhost ~]# docker tag c09f3ddbbc4b lingluanaishitou/tomcat:1.0
[root@localhost ~]# docker images
REPOSITORY                TAG       IMAGE ID       CREATED        SIZE
diytomcat                 latest    c09f3ddbbc4b   35 hours ago   693MB
lingluanaishitou/tomcat   1.0       c09f3ddbbc4b   35 hours ago   693MB
entorypoint-test          latest    f330c8fbdcd4   36 hours ago   231MB
cmdtest                   latest    d8eecbfcc40d   36 hours ago   231MB
mycentos                  0.1       dc825ed1d5e4   2 days ago     326MB
kuangshen/centos          latest    1db844ed918a   4 days ago     231MB
tomcat0001                1.0       09ef6b2e826f   5 days ago     684MB
tomcat                    <none>    fb5657adc892   2 weeks ago    680MB
centos                    latest    5d0da3dc9764   3 months ago   231MB
[root@localhost ~]# docker push lingluanaishitou/tomcat:1.0 上传成功
The push refers to repository [docker.io/lingluanaishitou/tomcat]
2204d5a44119: Pushing  9.757MB/66.31MB
f56faf184908: Pushing   12.4MB/13.55MB
c2fedf6d2918: Pushing  30.42MB/381.7MB
67f1ba4dbf6a: Pushed
 
---

阿里云镜像服务

登陆阿里云

找到容器镜像服务

创建命名空间