I am learning Docker of late and I have a few doubts with dockers volume. I want a few folders on my container to be mounted on my host machine, when the container starts and use the same volume from my host machine there on forward whenever the container is started.
I was using -v /path/on/host:/path/on/container
. But as per my understanding, since the directory on the host is empty and is mounted, the path in the container also empty and hence any configurations files on the container on this path is also empty.
How do I set up volumes such that as the container starts, the files and directories created on the container appear on the host volume also?