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

 

相关文章:

  • 2022-12-23
  • 2021-06-02
  • 2021-10-23
  • 2022-01-12
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2021-05-27
猜你喜欢
  • 2021-10-05
  • 2021-11-12
  • 2021-12-08
  • 2021-05-22
  • 2021-06-28
相关资源
相似解决方案