The docker-compose.override contains:
volumes:
- ./a:/path/to/a
The docker-compose:
volumes:
- a:/path/to/a
When docker-compose up is run the override overwrite the ./a
overwrites the a
.
When a new volume is added to docker-compose, the override will try to mount is as well.
docker-compose.override
volumes:
- ./a:/path/to/a
The docker-compose:
volumes:
- a:/path/to/a
- b:/path/to/b
How to prevent that the override will use volumes that are defined in the docker-compose file?
When docker-compose.override contains
volumes:
- a:/path/to/a
- .b:/path/to/b
the b is still mounted...