【发布时间】:2017-02-24 02:37:53
【问题描述】:
我们有一个 docker-swarm 集群。管理器节点持有我们私有 docker 注册表的凭证。当我们在其他节点上启动新容器时,可能需要从私有 docker 注册表中拉取镜像。
有没有办法告诉 crate 容器命令拉取图像(如果节点上不存在)并为其提供凭据?
例如:我们想从 swarm 管理器(具有私有 docker 注册表的凭据)调用以下命令:
docker create -e contraint:server==app docker.exampleRegistry.com/path/image:1.0.0
这应该会拉取图像并在另一个节点(标记为app)上启动一个容器。 docker 注册表docker.exampleRegistry.com 是私有的。但我们得到:
Error response from daemon: unauthorized: authentication required
【问题讨论】:
标签: authentication docker docker-registry docker-swarm