Docker Community Forums

Share and learn in the Docker community.

Postgres data folder unable to map to windows 7 host directory

dockerhub
docker

(Caapimorch) #1

Hi Guys,
I am using postgres official image and running a container using the same in an winodws 7 machine. I wish that data folder after db initialization as “/var/lib/postgresql/data” be mapped to my physical drive. I have created volumes in my docker-compose file. But when i am spinning the container , i am just seeing an empty data folder created. But when i am going into container and watching the data folder i am seeing all the files present there. Why the data folder created using volumes in windows physical host does not contain the same content as there in running container.
Please provide your useful thought to resolve the issue.