Windows 10上的docker-compose:找不到图片?

时间:2019-08-14 18:34:13

标签: docker docker-compose windows-10

我正在Windows 10 PC上进行本地开发,并且在驱动器D上安装了Docker映像。

运行命令“ docker images”显示... enter image description here

当我运行“ docker-compose up”命令时,出现以下错误...

Pulling eis-config (eis/eis-config:)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.
Continue with the new image? [yN]

知道为什么会这样吗? (是否可能是docker-compose在docker-hub而不是本地上查找图像?

'docker-compose.yml'文件如下所示...

version: "3.7" 
services:
   eis-config:
    image: eis/eis-config
    ports:
      - "8001:8001"

   eis-eureka:
    image: eis/eis-eureka
    ports:
      - "8761:8761"
    depends_on:
      - eis-config

   eis-zuul:
    image: eis/eis-zuul
    ports:
      - "8080:8080"
    depends_on:
      - eis-eureka

   gd-service:
    image: eis/gd-service
    ports:
      - "8015:8015"
    depends_on:
      - eis-eureka

4 个答案:

答案 0 :(得分:0)

似乎您错过了yml文件中的eis / eis-config服务条目,一旦检查了yml文件并为该服务重新生成了图像。

答案 1 :(得分:0)

您要在哪里在本地计算机或远程服务器上运行这些映像?

一旦查看此链接Error running containers with docker-compose, error pulling images from my private repo in dockerhub

答案 2 :(得分:0)

运行

docker-compose kill
docker-compose down
docker-compose up

应该解决您的问题,很可能您有一个导致问题的旧容器(无论运行与否)

答案 3 :(得分:0)

您正在运行不带Image标签的eis / eis-config,因此docker隐式地假定为最新。您没有带有最新标签的Image eis / eis-config。因此,请使用最新标签构建映像,或运行映像:eis / eis-config:0.0.1-SNAPSHOT