栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

docker push 上传本地镜像至docker hub

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

docker push 上传本地镜像至docker hub

docker push 上传本地镜像至docker hub
  • 1.在docker hub 注册账号
  • 2.docker login
  • 3.push
  • 4.成功

1.在docker hub 注册账号

https://hub.docker.com

2.docker login
[root@localhost ~]# 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@localhost ~]# docker login -u shandian534
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

3.push
在这里插入代码片[root@localhost ~]# docker push datalink
Using default tag: latest
The push refers to repository [docker.io/library/shandian534]
0d215d96f063: Preparing 
4623fdf578d8: Preparing 
89354bde4414: Preparing 
53930f9112e0: Preparing 
74ddd0ec08fa: Preparing 
denied: requested access to the resource is denied  #拒绝

#使用 docker tag 修改名称即可提交
#注意 修改tag的最前面必须是dockerhub的username       如:  docker hub上的用户名/datalink:1.0
[root@localhost ~]# docker tag 630e6298d0a3 shandian534/datalink:1.0
[root@localhost ~]# docker images
REPOSITORY          TAG       IMAGE ID       CREATED        SIZE
datalink           latest    630e6298d0a3   24 hours ago   677MB
root755/diytomcat   1.0       630e6298d0a3   24 hours ago   677MB
[root@localhost ~]# docker push shandian534/datalink:1.0
The push refers to repository [docker.io/shandian534/datalink]
0d215d96f063: Pushing [=====================>                             ]   28.1MB/64MB
4623fdf578d8: Pushing [==================================>                ]  10.99MB/16.06MB
4.成功
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/941901.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号