When I try to run ' docker-compose up" the command prompt throws the below error :
$ docker-compose up
Building tomcat
unknown flag: --iidfile
See 'docker build --help'.
ERROR: Service 'tomcat' failed to build
Below is the Dockerfile and docker-compose.yml file:
$ cat Dockerfile.dev
FROM node:alpine
WORKDIR '/app'
COPY package.json .
RUN npm install
COPY . .
CMD ["npm", "run", "start"] `
$ 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
- .:/app
command: ["npm", "run", "test"]
Do I have something wrong configuration in Dockerfile or docker-compose.yml?
I faced the same problem when using docker-compose 1.29.1. Downgrading to docker-compose 1.26.2 resolved this problem.
reinstall docker-compose 1.26.2
rm -f /usr/local/bin/docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With