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
