The goal:
share project directory on Windows to the container, with docker toolbox
for the testing, I took this php:5.6.15-apache
What I did:
I have tried a few recommendations:
run with options -v
docker run --name=simple2 --rm -v "/c/Users/Admin/pr:/var/www/html" -p 80:80 -p 8080:8080 -d php:5.6.15-apache
Create a shared directory in default VM
and mount it inside default docker container
mkdir /home/docker/pr
mount -t vboxsf -o uid=1000,gid=50 pr /home/docker/pr
Run container with mounting on the shared directory, in this case creates a directory inside docker with name pr
docker run -d --name simple2 -it -v /var/www/html:/pr -p 80:80 -p 8080:8080 -d php:5.6.15-apache docker inspect simple2 "Mounts": [ { "Type": "bind", "Source": "/var/www/html", "Destination": "/pr", "Mode": "", "RW": true, "Propagation": "rprivate" } ],
none of this didn't follow me to the success. I mean none of this steps doesn't share the code between php:5.6.15-apache and Windows
Where did I do wrong?