New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Quickstart Terminal replaces coloms by semi-coloms #80

Closed
jdevora opened this Issue Aug 13, 2015 · 16 comments

Comments

Projects
None yet
@jdevora

jdevora commented Aug 13, 2015

I'm trying to execute a container mapping the current directory on Windows, using the new "Docker Quickstart Terminal".

The problem is that the paths get changed before executing docker.

$ docker run  -v /c/Users/myuser/test:/project ubuntu:14.04 
invalid value "c:\\Users\\myuser\\test;C:\\Program Files (x86)\\Git\\project" for  flag -v: bad mount mode specified : \Program Files (x86)\Git\project
See 'c:\Program Files\Docker Toolbox\docker.exe run --help'.

As you can see a valid path with the old boot2docker gets converted to a pseudo Windows style path replacing the : that separates the host and the container directories to a ;

Using a Windows style path doesn't help either

@mchiang0610

This comment has been minimized.

Show comment
Hide comment
@mchiang0610

mchiang0610 Aug 13, 2015

Contributor

@jdevora Thanks for reporting this. We will look into this problem.

Contributor

mchiang0610 commented Aug 13, 2015

@jdevora Thanks for reporting this. We will look into this problem.

@doxxx

This comment has been minimized.

Show comment
Hide comment
@doxxx

doxxx Aug 15, 2015

Try //project. This is something that the MSYS environment does to map POSIX paths to Windows paths before passing them to executables.

doxxx commented Aug 15, 2015

Try //project. This is something that the MSYS environment does to map POSIX paths to Windows paths before passing them to executables.

@SvenDowideit

This comment has been minimized.

Show comment
Hide comment
@SvenDowideit

SvenDowideit Aug 17, 2015

Contributor

ah, thank goodness this wasn't just something odd about my windows 10 box :) - confirmed.

Contributor

SvenDowideit commented Aug 17, 2015

ah, thank goodness this wasn't just something odd about my windows 10 box :) - confirmed.

@likol

This comment has been minimized.

Show comment
Hide comment
@likol

likol Sep 4, 2015

same issue for me, and thanks @doxxx , it's worked!

OS: Windows 10
Toolbox version: 1.8.1c

likol commented Sep 4, 2015

same issue for me, and thanks @doxxx , it's worked!

OS: Windows 10
Toolbox version: 1.8.1c

@acuthbert

This comment has been minimized.

Show comment
Hide comment
@acuthbert

acuthbert Sep 8, 2015

Same for me. This is really frustrating as I can't get any tutorial to work. I can't even use docker-compose as I'm using the container method for that, and it requires the -v switch too:

$ docker-compose up
invalid value "C:\\Program Files\\Git\\var\\run\\docker.sock;C:\\Program Files\\Git\\var\\run\\docker.sock" for flag -v: bad mount mode specified : \Program Files\Git\var\run\docker.sock
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

@doxxx I've tried putting the extra slash at the start of the path on the right hand side of the colon but then I get "Bad Address" instead:

bash: /c/Program Files/Docker Toolbox/docker: Bad address

acuthbert commented Sep 8, 2015

Same for me. This is really frustrating as I can't get any tutorial to work. I can't even use docker-compose as I'm using the container method for that, and it requires the -v switch too:

$ docker-compose up
invalid value "C:\\Program Files\\Git\\var\\run\\docker.sock;C:\\Program Files\\Git\\var\\run\\docker.sock" for flag -v: bad mount mode specified : \Program Files\Git\var\run\docker.sock
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.

@doxxx I've tried putting the extra slash at the start of the path on the right hand side of the colon but then I get "Bad Address" instead:

bash: /c/Program Files/Docker Toolbox/docker: Bad address
@doxxx

This comment has been minimized.

Show comment
Hide comment
@doxxx

doxxx Sep 9, 2015

@acuthbert Docker Toolbox does not include docker-compose on Windows as it is not currently supported as far as I know.

doxxx commented Sep 9, 2015

@acuthbert Docker Toolbox does not include docker-compose on Windows as it is not currently supported as far as I know.

@doxxx

This comment has been minimized.

Show comment
Hide comment
@doxxx

doxxx Sep 9, 2015

@acuthbert What you can try doing as a workaround for Windows though, is to SSH into the VM created by docker-machine and install and run docker-compose directly there.

doxxx commented Sep 9, 2015

@acuthbert What you can try doing as a workaround for Windows though, is to SSH into the VM created by docker-machine and install and run docker-compose directly there.

@tryjude

This comment has been minimized.

Show comment
Hide comment
@tryjude

tryjude Sep 12, 2015

For anyone else having this problem I found a comment in another thread that helped clear it up. The double slash has to be at the beginning. Not after the colon.

Here is my working example now:

docker run -d -p 5000:5000 -v //c/Users/jude/helloapp:/opt/flask-intro --name web flask-intro

HTH

tryjude commented Sep 12, 2015

For anyone else having this problem I found a comment in another thread that helped clear it up. The double slash has to be at the beginning. Not after the colon.

Here is my working example now:

docker run -d -p 5000:5000 -v //c/Users/jude/helloapp:/opt/flask-intro --name web flask-intro

HTH

@timshephard

This comment has been minimized.

Show comment
Hide comment
@timshephard

timshephard Nov 13, 2015

Thanks tryjude, that helped with the "bad address" problem.

timshephard commented Nov 13, 2015

Thanks tryjude, that helped with the "bad address" problem.

@chefhoobajoob

This comment has been minimized.

Show comment
Hide comment
@chefhoobajoob

chefhoobajoob Nov 28, 2015

@tryjude : this works for me too - thanks!

chefhoobajoob commented Nov 28, 2015

@tryjude : this works for me too - thanks!

@evbo

This comment has been minimized.

Show comment
Hide comment
@evbo

evbo Jan 24, 2016

the suggestion to put two slashes, "//c/", is not working for me. It creates the folder inside your docker container, but there is no persistence from my local C drive (files inside that folder are non-existent.

If you've gotten it to work using the double slashes, please give your full steps as my conclusion is either correct or misguided.

evbo commented Jan 24, 2016

the suggestion to put two slashes, "//c/", is not working for me. It creates the folder inside your docker container, but there is no persistence from my local C drive (files inside that folder are non-existent.

If you've gotten it to work using the double slashes, please give your full steps as my conclusion is either correct or misguided.

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Jan 25, 2016

Member

@evbo make sure that the Windows path is somewhere inside c:\Users, because by default, that's the only path shared with the virtual machine

Member

thaJeztah commented Jan 25, 2016

@evbo make sure that the Windows path is somewhere inside c:\Users, because by default, that's the only path shared with the virtual machine

@SvenDowideit

This comment has been minimized.

Show comment
Hide comment
@SvenDowideit

SvenDowideit Feb 7, 2016

Contributor

This looks to have been fixed for the docker binary when run from bash and cmd.exe

sven@DESKTOP-Q9P9MVC MINGW64 ~/src (main)
$ docker run  --rm -it -v /c/Users/sven/test:/project debian ls
bin   dev  home  lib64  mnt  proc     root  sbin  sys  usr
boot  etc  lib   media  opt  project  run   srv   tmp  var
sven@DESKTOP-Q9P9MVC MINGW64 ~/src (main)
$ docker run  --rm -it -v /c/Users/sven/test:/project -w /project debian pwd
/project

however, there are issues when you're using something else - for example, #397

so - @jeffdm can we close this one?

Contributor

SvenDowideit commented Feb 7, 2016

This looks to have been fixed for the docker binary when run from bash and cmd.exe

sven@DESKTOP-Q9P9MVC MINGW64 ~/src (main)
$ docker run  --rm -it -v /c/Users/sven/test:/project debian ls
bin   dev  home  lib64  mnt  proc     root  sbin  sys  usr
boot  etc  lib   media  opt  project  run   srv   tmp  var
sven@DESKTOP-Q9P9MVC MINGW64 ~/src (main)
$ docker run  --rm -it -v /c/Users/sven/test:/project -w /project debian pwd
/project

however, there are issues when you're using something else - for example, #397

so - @jeffdm can we close this one?

@evbo

This comment has been minimized.

Show comment
Hide comment
@evbo

evbo Feb 7, 2016

Persisting only within the Windows "Users" directory is a bit too restrictive for some needs. Here is a work around that I use on a daily basis now:

first, ensure (using the GUI) that virtualbox has a shared folder setup to your liking (in this case we will map to a c:\work folder). Open Docker Toolbox. then, ssh into your virtual machine
docker-machine ssh default

get to your root directory in the linux machine
cd /

create a directory to share (persist) data with your local machine
sudo mkdir work

mount the shared folder named "work" to the "/work" dir inside the Boot2Docker VM
sudo mount -t vboxsf work /work

run the container with the mounted "/work" volume located at "/work" inside the container

docker run --volume /work:/work \
--name "someContainer" \
--rm -i -t [some container]

evbo commented Feb 7, 2016

Persisting only within the Windows "Users" directory is a bit too restrictive for some needs. Here is a work around that I use on a daily basis now:

first, ensure (using the GUI) that virtualbox has a shared folder setup to your liking (in this case we will map to a c:\work folder). Open Docker Toolbox. then, ssh into your virtual machine
docker-machine ssh default

get to your root directory in the linux machine
cd /

create a directory to share (persist) data with your local machine
sudo mkdir work

mount the shared folder named "work" to the "/work" dir inside the Boot2Docker VM
sudo mount -t vboxsf work /work

run the container with the mounted "/work" volume located at "/work" inside the container

docker run --volume /work:/work \
--name "someContainer" \
--rm -i -t [some container]
@jmorganca

This comment has been minimized.

Show comment
Hide comment
@jmorganca

jmorganca Feb 17, 2016

Contributor

@SvenDowideit indeed. Thanks for pinging me!

Contributor

jmorganca commented Feb 17, 2016

@SvenDowideit indeed. Thanks for pinging me!

@jmorganca jmorganca closed this Feb 17, 2016

@w23ta0

This comment has been minimized.

Show comment
Hide comment
@w23ta0

w23ta0 commented Jul 7, 2016

@doxxx Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment