Docker Community Forums

Share and learn in the Docker community.

[Solved] "docker run" under Windows 10 - mount volume issue


(Loulouklm) #1

Hi everybody,

I’m trying Docker under Windows 10. I follow steps https://docs.docker.com/v1.8/installation/windows/
Docker Hello world works fine!

As specify on docker.com I don’t use Boot2Docker that is deprecated.

I would like to make a basic nginx/php/mysql for test. I follow this http://www.newmediacampaigns.com/blog/docker-for-php-developers

I can do all steps but not the last one.

I can run
$ docker run -d -p 8080:80 louis/nginx;
a7185bf79fc5c42913e83b260d14c812e8191dea37831a2954b85787e97ef077

it works.

But when I launch:

 docker run \
-d \
-p 8080:80 \
-v $(pwd)/src/vhost.conf:/etc/nginx/sites-enabled/vhost.conf \
-v $(pwd)/src:/var/www \
louis/nginx;

I have this message:
invalid value “C:\testdocker\src\vhost.conf;C:\Program Files\Git\etc\nginx\sites-enabled\vhost.conf” for flag -v: bad mode specified: \Program Files\Git\etc\nginx\sites-enabled\vhost.conf
See ‘C:\Program Files\Docker Toolbox\docker.exe run --help’.

I don’t how to set parameters after -v …

I tried:
$ docker run \

-d \
-p 8080:80 \
-v /c/testdocker/src/vhost.conf:/etc/nginx/sites-enabled/vhost.conf \
-v /c/testdocker/src:/var/www \
louis/nginx;

But same error:
invalid value “C:\testdocker\src\vhost.conf;C:\Program Files\Git\etc\nginx\sites-enabled\vhost.conf” for flag -v: bad mode specified: \Program Files\Git\etc\nginx\sites-enabled\vhost.conf
See ‘C:\Program Files\Docker Toolbox\docker.exe run --help’.

I’m sure that nothing. Can you help me?

Many thanks

Louis


(Loulouklm) #2

Fixed: Add this => // before windows letter. Ex:

docker run -d -p 8080:80 -v //c/src/vhost.conf:/etc/nginx/sites-enabled/vhost.conf -v //c/src:/var/www louis/nginx;

Source: