Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Unable to mount volumes on Windows #165

Closed
bweston92 opened this issue Sep 9, 2015 · 3 comments
Closed

Unable to mount volumes on Windows #165

bweston92 opened this issue Sep 9, 2015 · 3 comments

Comments

@bweston92
Copy link

Related to dduportal-dockerfiles/docker-compose#16

bash.exe"-3.1$ docker run --rm -it -v $(pwd):"/workspace" denisura/phpmd
invalid value "d:\\;C:\\Program Files (x86)\\Git\\workspace" for flag -v: bad mount mode specifie
d : \Program Files (x86)\Git\workspace
See 'c:\Program Files\Docker Toolbox\docker.exe run --help'.
bash.exe"-3.1$ docker run --help

Take note C:\\Program Files (x86)\\Git is where bash is so workspace is being appended to my bash location.

@AustinMaddox
Copy link

The temporary fix on Windows is avoid using "$(pwd)" and provide absolute paths with an extra / in front of them.

docker run --rm -it -v //path/to/your/workspace:/workspace denisura/phpmd

@mchiang0610
Copy link
Contributor

@austin881 Thanks for the suggestion.

@bweston92 Does that help? Unfortunately this is more of a docker issue. I will pass it on to the rest of the Docker team. The Toolbox worked as an installer to get Docker started.

Thanks!

@byrne-yan
Copy link

@austin881 double-slash work around seems incomplete:
no error report when running docker run, however files in my workspace disappear in workspace in container

test code:

mkdir -p /c/testdir
cd /c/testdir
touch hello.txt
docker run -it -v //c/testdir:/home/testdir ubuntu bash
cd /home/testdir
ls

no hello.txt file exists

touch world.txt
exit
ls

no world.txt found!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants