繁体   English   中英

如何在私有注册表中运行 docker 映像

[英]How to run docker image in private registry

我在 Ubuntu 服务器 18.04(使用 docker-compose)上有一个私有的不安全注册表,其 IP 假设为 192.168.168.168; 在 Windows 客户端上时,我从 Chrome 浏览到

http://192.168.168.168:5000/v2/_catalog

我明白了

{"repositories":["hello-world2","mywebservice"]}

没关系,因为我将它们推送到私人注册表。 所以:

  1. 如何在 Ubuntu 服务器上运行这些图像?
  2. 关于“mywebservice”,它是一个 REST webservice,我该如何运行它,以便我可以从本地 Windows 客户端的浏览器访问它?

我已经试过了

docker run 192.168.168.168:5000/mywebservice

但得到了

无法在本地找到图像“192.168.168.168:5000/mywebservice:latest”

Docker 注册表不是 Docker 引擎,它不能运行容器。

If one wants to run a Docker container on the same server where the Docker registry is, it is necessary to pull the image from the registry to a Docker client (using docker pull localhost:5000/image_name ), and then run it the usual way .

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM