In my docker-compose I have a named-volume like this config:/var/lib/myservice/config.yml. When I start the container I expect the config.yml file to be at: var/lib/docker/volume/myservice_config/_data on the host machine, but the _data folder is empty.
But if i write the named-volume without the filename like this: config:/var/lib/myservice then the config.yml appears in the _data folder
So does named-volume only work when pointing at a directory and not at a absolute path to a file?