That is exactly the same way directories are mounted from the host to the container.
Thus, docker compose itself creates the necessary folders, and writes to them information that it should otherwise just write inside the container.
In practice, everything works… And my logic goes like this:
I was instructed by a developer on how to properly install his software.
I did it and it works.
Then I thought that I have a lot of containers and a volumes and it would be good to at least be able to monitor it, so that nothing is lost or deleted accidentally.
The “docker volume ls” seems to be designed for this purpose.
It prints list of volumes in the file above:
And logically they should have been output by docker.
Or do you not think so?
Should I redo the file the developer gave to see this volume, or should I accept the fact that the volume is not displayed in this case?