第五节 发布镜像到dockerhub

提交镜像到dockerhub

# 1. 登录dockerhub,docker login -u xxx -p xxx
[root@amumu ~]# docker login -u zzlamumu -p zhu614083
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
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
# 2. 设置一个标签(这一步非必须)
[root@amumu ~]# docker tag  6f3382910227 amumu/tomcat:9.0
[root@amumu ~]# 
[root@amumu ~]# 
[root@amumu ~]# docker images
REPOSITORY              TAG       IMAGE ID       CREATED        SIZE
mytomcat                9.0       6f3382910227   8 hours ago    689MB
amumu/tomcat            9.0       6f3382910227   8 hours ago    689MB
dockerentrypoint-test   1.0       022c0f02e90a   12 hours ago   209MB
dockercmd-test          1.0       50e092624b77   12 hours ago   209MB
mycentos                1.0       ff0a2b5b0669   16 hours ago   291MB
mysql                   5.7       87eca374c0ed   3 weeks ago    447MB
nginx                   latest    62d49f9bab67   4 weeks ago    133MB
centos                  latest    300e315adb2f   5 months ago   209MB
# 3. 提交镜像
[root@amumu ~]# docker push amumu/tomcat:9.0             
The push refers to repository [docker.io/amumu/tomcat]
e44887d9a4a4: Preparing 
3aebfcc88cd2: Preparing 
925b50ac90b0: Preparing 
d0dc4485231d: Preparing 
2653d992f4ef: Preparing 
denied: requested access to the resource is denied

猜你喜欢

转载自blog.csdn.net/qq_20663229/article/details/116840824