Reputation: 36107
What is wrong with my docker-compose.yml
file ?
docker-compose complains:
docker-compose up ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
in ".\docker-compose.yml", line 7, column 16
This is my socker-compose.yml
version: '2.0'
services:
cass1:
image: cassandra
cass2:
image cassandra
environment:
- CASSANDRA_SEEDS=cass1
depends_on:
- "cass1"
cass4:
image cassandra
environment:
- CASSANDRA_SEEDS=cass1
depends_on:
- "cass1"
I'am looking at the docker-compose's documentation here: https://docs.docker.com/compose/environment-variables/ and this example is similar to my file:
Set environment variables in containers
You can set environment variables in a service’s containers with the ‘environment’ key, just like with docker run -e VARIABLE=VALUE ...:
web: environment: - DEBUG=1
Upvotes: 0
Views: 1701
Reputation: 6709
You missed the colon on the previous line. Change image cassandra
to image: cassandra
.
Upvotes: 2