如何发布自己的镜像
1、地址https://hub.docker.com/注册自己的账号
2、确定这个账号可以登录
[root@liuyang ~]# docker login -u zhuangbiliuyang
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@liuyang ~]#
3、在我们服务器上提交自己的镜像
[root@liuyang dockerfile]# docker tag 67b2d498c93c zhuangbiliuyang/diyliuyang_centos:1.0
[root@liuyang dockerfile]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos_liuyang 1.6 2c0580c11880 44 minutes ago
zhuangbiliuyang/diyliuyang_centos 1.0 67b2d498c93c 50 minutes ago 209MB
[root@liuyang dockerfile]# docker push zhuangbiliuyang/diyliuyang_centos:1.0
The push refers to repository [docker.io/zhuangbiliuyang/diyliuyang_centos]
push的时候注意的事项:
1、本地tag没有1.0版本的自己的镜像,重新修改TAG标签:
docker tag 镜像ID 用户名/镜像名:1.0
2、push的时候一定带上版本号