发布镜像

DockerHub
1.地址:https://hub.docker.com/
2.确定账号可以登录
3.在我们服务器上提交自己的镜像

[root@VM-16-11-centos test]# docker login --help

Usage:  docker login [OPTIONS] [SERVER]

Log in to a Docker registry.
If no server is specified, the default is defined by the daemon.

Options:
  -p, --password string   Password
      --password-stdin    Take the password from stdin
  -u, --username string   Username
#登录成功
[root@VM-16-11-centos test]# docker login -u zbowen55
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

4.登录完毕后,可以提交镜像了,docker push

[root@VM-16-11-centos tomcat]# docker images
REPOSITORY            TAG       IMAGE ID       CREATED          SIZE
zbowen55/mytomcat     test      ee3513bfc81a   24 minutes ago   686MB
diytomcat             latest    ee3513bfc81a   24 minutes ago   686MB

[root@VM-16-11-centos tomcat]# docker push zbowen55/mytomcat:test
The push refers to repository [docker.io/zbowen55/mytomcat]
1146a22c916c: Preparing 
30706bbed908: Preparing 
32f1e173dbed: Preparing 
4736fd04b110: Pushing   2.56kB
2653d992f4ef: Preparing 

#可以更改镜像标签
[root@VM-16-11-centos tomcat]# docker tag ee3513bfc81a zbowen55/mytomcat:1.0
[root@VM-16-11-centos tomcat]# docker images
REPOSITORY            TAG       IMAGE ID       CREATED          SIZE
diytomcat             latest    ee3513bfc81a   27 minutes ago   686MB
zbowen55/mytomcat     1.0       ee3513bfc81a   27 minutes ago   686MB

阿里云镜像参考官方文档。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值