Reputation: 645
I have created a docker-compose file using version 3. but When I try to run it, it throws this error.
ERROR: The Compose file '.\docker-compose.yml' is invalid because:
Unsupported config option for services.interaction: 'container-name'
Unsupported config option for services.user: 'container-name'
I have made sure my indenting is correct but still it throws this error. does anybody know what else I could check for?
Here's my compose file
version: '3'
services:
content:
container-name: content
restart: always
build: ./Content
ports:
- '3000:3000'
external_links:
- mongo
interaction:
container-name: interaction
restart: always
build: ./Interaction
ports:
- '3002:3002'
external_links:
- mongo
user:
container-name: user
restart: always
build: ./User
ports:
- '3001:3001'
external_links:
- mongo
mongo:
container_name: mongo
image: mongo
ports:
- '27017:27017'
I have been following Brad Traversey's tutorial for docker-compose and it matches up with that
Upvotes: 0
Views: 1558
Reputation: 645
It's supposed to be "container_name" instead of "container-name". that's where the problem was
Upvotes: 2