I made a docker image called myImage
, there is a folder: /data
I want to let the user edit it by themselves. I read that -v
flag can mount the volume, so I used it like following:
I run the container with this command:
docker run -v /my_local_path:/data -it myImage /bin/bash
But surprisingly, docker cleared all the files in /data
in the container. But this is not I want... I want actually the host can get all the files from /data
... :(
How can I do that?