发布镜像
发布镜像到DockerHub
- 在DockerHub官网上注册一个账号
- 在控制台登录账号
[root@iZbp1htnoa70qlle394f3wZ ~]# docker login -u luoking
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
- 提交镜像 docker push
1.docker tag 需要提交的镜像ID luoking/kingtomcat:1.0 (作者名/镜像名):版本号
2.docker push luoking/kingtomcat:1.0 (作者名/镜像名):版本号

4. 登出
[root@iZbp1htnoa70qlle394f3wZ ~]# docker logout
Removing login credentials for https://index.docker.io/v1/
发布镜像到阿里云
登入阿里云官网

$ docker login --username=aliyun653130**** registry.cn-hangzhou.aliyuncs.com
$ docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/luoking/luoking-test:[镜像版本号]
$ docker push registry.cn-hangzhou.aliyuncs.com/luoking/luoking-test:[镜像版本号]


浙公网安备 33010602011771号