如何将Docker映像从Docker Hub私有注册表中提取到Azure容器服务(ACS)中? [英] How to pull docker image from docker hub private registry into Azure Container Service (ACS)?

查看:137
本文介绍了如何将Docker映像从Docker Hub私有注册表中提取到Azure容器服务(ACS)中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Docker中心(hub.docker.com)中设置了一个私有注册表:rbiswas / http-service。
现在,我尝试按照以下提到的步骤将映像拉入/运行到Azure容器服务(ACS)群集虚拟机中:

I have setup a private registry in Docker hub (hub.docker.com): rbiswas/http-service. Now I am trying to pull/run this image into Azure Container Service (ACS) cluster vm by following the steps mentioned below:

首先,我将ssh插入ACS集群使用以下命令:

First I ssh into the ACS cluster using command:

ssh -i /home/rbiswas/.ssh/acs_rsa -L 2375:localhost:2375 -N rbiswas@swarmclustermgmt.eastasia.cloudapp.azure.com -p 2200

然后在以下命令中使用以下命令另一个终端:

Then I use the following commands in another terminal:

docker -H tcp://localhost:2375 login hub.docker.com
docker -H tcp://localhost:2375 run -i -d -p 8080:8080 rbiswas/http-service

但是即使成功登录后,我也遇到以下错误:

But I am getting the following error even after successful login:

docker: Error response from daemon: Not found.

但是如果我将docker hub注册中心公开,那么docker run命令将会成功。那么,如何从Docker Hub私有注册表中提取信息呢?

But if I make the docker hub registry public, then the docker run command is successful. So how do I pull from a Docker Hub private registry?

推荐答案

我通过分别运行pull and run命令解决了这个问题:

I solved the issue by running pull and run command separately:

docker -H tcp://localhost:2375 login
docker -H tcp://localhost:2375 pull rbiswas/http-service
docker -H tcp://localhost:2375 run -i -d -p 8080:8080 rbiswas/http-service

这篇关于如何将Docker映像从Docker Hub私有注册表中提取到Azure容器服务(ACS)中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆