we have created a docker file with volume as below
- VOLUME ["/var/lib/postgresql/data","/var/run/postgresql","/tmp"]
I build that docker file, then i created container from above built image using below command.
docker run --name "postgres_db_2" -d -p 5430:5432 -e POSTGRES_PASSWORD=password -e PGDATA=/var/lib/postgresql/data/pgdata a70725c8d274
Executed below command to check any volume has been created or not?
docker volume ls
Above command listed 3 volumes, as expected. I inspected the volume using below command and found the mount point for that volume.
docker volume inspect 9fc062c4bc1a1324dd627a19ad4bbd63d55afee7b6d432fdd6c0cea2f5d15c25
[
{
"CreatedAt": "2022-01-10T13:48:34Z",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/9fc062c4bc1a1324dd627a19ad4bbd63d55afee7b6d432fdd6c0cea2f5d15c25/_data",
"Name": "9fc062c4bc1a1324dd627a19ad4bbd63d55afee7b6d432fdd6c0cea2f5d15c25",
"Options": null,
"Scope": "local"
}
]
using , docker desktop in windows 10 system.
How to find the mount point location in host system?