'Docker compose external volume path
Where is the mount point of an external volume located on a windows 10 host machine when using docker compose v3? e.g. The host path for mydata when the top-level volumes key is set as follows:
volumes:
mydata:
external: true
Solution 1:[1]
Using external makes docker search for a folder named what you called it - in your case mydata.
If this folder doesn't exist there will be no mount and no error will be raised.
https://docs.docker.com/compose/compose-file/compose-file-v3/#external
You can also use the inspect to see the exact location:
Docker inspect -f "{{json. Mounts}}" container_name | jq.
https://container-solutions.com/understanding-volumes-docker/
Solution 2:[2]
If you mean the internal path used by Docker, try to inspect an existing one:
docker volume inspect my-vol.
It will show where the data is stored.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | smac89 |
| Solution 2 | J. Scott Elblein |
