version: "2"
services:
service_a:
volumes:
- volume_a:/opt/volume_a
volumes:
# First attempt - ERROR: In file './docker-compose.dev.yml', volume must be a mapping, not a string.
volume_a: /path/to/volume:ro
# Second attempt - ERROR: In file './docker-compose.dev.yml', volume must be a mapping, not an array.
volume_a:
- /path/to/volume:ro