Docker经常组合命令超时

问题描述 投票:0回答:1

我正在使用Docker For Windows,并且已经在我的docker主机上构建了一组图像。当我尝试使用docker-compose up -d命令启动我的环境时,我经常面临不同容器的i / o超时错误。通常,重试有帮助,但我正在尝试自动执行此操作,并且无法期望重新运行整个管道。

版本:

Docker version 18.09.0, build 4d60db4

docker-compose version 1.23.1, build b02f1306

命令行日志:

C:\workspace\AK_DOCKER_RISK\docker-compose>docker-compose up -d
Creating risk-svc ... 
Creating risk-svc ... done
Creating risk-prc ... 
Creating risk-web ... 
Creating risk-web ... error
ERROR: for risk-web  b'i/o timeout'
Creating risk-prc ... done
ERROR: for web  b'i/o timeout'

Encountered errors while bringing up the project.

随机观察到错误,有时是svc,web或prc。

有人可以解释为什么会出现这种错误,更重要的是 - 如何解决这个问题?

这是我的docker-compose.yml文件:

version: '3'
services:
  web:
    image: iis-core-web:1910.252
    build:
      context: .
      dockerfile: ./web/Dockerfile
    container_name: risk-web
    ports:
      - "9111:8080"
    tty: true
    links:
      - svc
    volumes:
      - ../RiskLogs/web:c:/RiskLogs
  svc:
    image: iis-core-svc:1910.252
    build:
      context: .
      dockerfile: ./svc/Dockerfile
    container_name: risk-svc
    ports:
      - "9112:8080"
    tty: true
    volumes:
      - ../RiskLogs/svc:c:/RiskLogs
  prc:
    image: iis-core-prc:1910.252
    build:
      context: .
      dockerfile: ./prc/Dockerfile
    container_name: risk-prc
    tty: true
    links:
      - svc
    volumes:
      - ../RiskLogs/prc:c:/RiskLogs
  # prevent creation of new network and use existing nat
networks:
  default:
    external:
      name: nat
docker docker-compose docker-for-windows
1个回答
0
投票

链接是一项传统功能。根据文档尝试用户定义的网络:

https://docs.docker.com/compose/compose-file/#links

© www.soinside.com 2019 - 2024. All rights reserved.