docker更改默认仓库地址

docker更改默认仓库地址
复制代码

zq@ubuntu:~$ docker pull -h
Flag shorthand -h has been deprecated, please use --help

Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST]

Pull an image or a repository from a registry

Options:
-a, --all-tags Download all tagged images in the repository
–disable-content-trust Skip image verification (default true)

复制代码

docker pull ubuntu:16.04 默认会从docker.io上下载镜像,可以如下方式改默认的registry地址:

在/etc/docker/daemon.json文件(没有请自行创建)添加如下配置:

“registry-mirrors”: [“https://registry.docker-cn.com”] # registry.docker-cn.com是国内的镜像网站

保存配置并重启docker daemon

如果只是临时的从其他仓库下载镜像,可以在docker pull的时候指定镜像的全路径

docker pull your-registry-server/your/image/path

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值