So, I’m trying to use volumes in Docker.
I have a container where inside a folder called
/db stores a
.sql file used to create a
If I create a volume and attach the volume with
sudo docker run -v my_volume:/app/db -it --privileged accumulator everything works smoothly as the content of the /app/db of the container is correctly copied to the volume and used from there.
If, instead, I want to use an host directory, using for istance
sudo docker run -v /home/nicola/Documents/db:/app/db -it --privileged accumulator docker correctly links the folders but it doesn’t copy the content on the
/db folder inside the container to the
/db folder on the host.
Is it a normal behavior?