LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Docker: mounting problems (https://www.linuxquestions.org/questions/general-10/docker-mounting-problems-4175559889/)

gubak 11-25-2015 03:21 PM

Docker: mounting problems
 
Hi everyone,

I am new in docker technology and I have some issue according to sharing Host OS folders to container. What I want to create is a php-apache-mysql development environment on Windows 10 OS.

What I did so far is: Installed Docker 1.9 (Windows 10 host OS, VirtualBox) and started PHP-APACHE container (Debian 8). The php-apache environment was setted properly, what I want is to mount the webpage source code files and folders (c:/workspace/www) to the container's /var/www/html mountpoint. I did it with : “docker run -v //c:/workspace/www:/var/www/html ...”, but when I log in to the container and check the /var/www/html, it is empty (actually c:/workspace/www is full of files and folders). I thought that the mount process failed, so I made some tests and mounted another windows directory (c:/users) with command: “docker run -v //c:/users:/var/www/html ...”. This time everything was ok (the /var/www/html contained all the directories what c:/users contains.)

Do you have any idea how to solve this?

Thanks

Habitual 11-26-2015 07:53 AM

Code:

docker run -v /inside_the_containter:/path/you/want/to/mount -i -t imagename
See http://docs.docker.com/engine/userguide/dockervolumes/

Have Fun!


All times are GMT -5. The time now is 07:20 AM.