Question: Why do I get this error?
ERROR: In file \'./docker-compose.yml\', volume \'mariavolume\' must be a mapping not a string.>
Unfortunately, there is no such a feature.
You can’t map a top-level volume in docker-compose.
Here are the options:
Create a volume outside of the compose (with mapping) and use it in your compose.
volumes:
maria_volume:
external:
name: volume-name