簡體   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