How to pull docker image from docker hub private registry into Azure Container Service (ACS)?

余生颓废 提交于 2019-12-08 13:41:45

问题


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:

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.

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?


回答1:


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


来源:https://stackoverflow.com/questions/42406966/how-to-pull-docker-image-from-docker-hub-private-registry-into-azure-container-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!