【Docker】 Docker pull的时候指定仓库

在这里插入图片描述

1.概述

默认情况下docker pull会从docker hub拉取镜像文件,也可以手动指定一个仓库地址拉取镜像。假如你设置了一个本地仓库地址,那么你只要指定这个地址拉取镜像即可。仓库地址类似一个URL,但是没有协议头http://。

例如从一个镜像地址:myregistry.local:5000,拉取镜像文件:testing/test-image:

$ docker pull myregistry.local:5000/testing/test-image

docker仓库地址凭证由docker login管理。

docker与各个仓库地址默认以https://来通信,除非该仓库地址允许以不安全的链接方式访问,更多信息请参考docker-insecure-registries。

案例

(base) lcc@lcc pushgateway-1.2.0.darwin-amd64$ docker pull hub-mirror.c.163.com/prom/prometheus
Using default tag: latest
latest: Pulling from prom/prometheus
0f8c40e1270f: Already exists
626a2a3

猜你喜欢

转载自blog.csdn.net/qq_21383435/article/details/106063177
今日推荐