小编JOY*_*Y_M的帖子

无法从 docker-compose 启动 docker Container - “未知标志:--iidfile”

当我尝试运行“docker-compose up”时,命令提示符会引发以下错误:

$ docker-compose up
Building tomcat
unknown flag: --iidfile
See 'docker build --help'.
ERROR: Service 'tomcat' failed to build
Run Code Online (Sandbox Code Playgroud)

下面是 Dockerfile 和 docker-compose.yml 文件:

$ cat Dockerfile.dev
FROM node:alpine

WORKDIR '/app'

COPY package.json .
RUN npm install
COPY . .

CMD ["npm", "run", "start"] `
Run Code Online (Sandbox Code Playgroud)
$ cat docker-compose.yml
version: '3'
services:
  tomcat:
    restart: always
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - "3000:3000"
    volumes:
      - /app/node_modules
      - .:/app
  tests:
    restart: always
    build:
      context: .
      dockerfile: Dockerfile.dev
    volumes:
      - /app/node_modules
      - …
Run Code Online (Sandbox Code Playgroud)

node.js docker docker-compose docker-image alpine-linux

5
推荐指数
1
解决办法
3152
查看次数