# Docker toolbox and windows paths

**URL:** <https://forums.docker.com/t/docker-toolbox-and-windows-paths/60392>\
**Category:** Docker Desktop\
**Tags:** windows\
**Created:** [October 12, 2018, 4:39am UTC](https://forums.docker.com/t/docker-toolbox-and-windows-paths/60392 "2018-10-12T04:39:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bananaacid](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@bananaacid](https://forums.docker.com/u/bananaacid)\
**Post date:** [October 12, 2018, 4:39am UTC](https://forums.docker.com/t/docker-toolbox-and-windows-paths/60392/1 "2018-10-12T04:39:58Z")

</div>

So I need help to get this clarified:

Docker toolbox (`docker.exe`) has issues to with windows paths in the `--volume` param.

ISSUE -\> RESULT

- colon “`:`” do not work -\> no other drive then C possible
- spaces “``” do not work -\> no default windows folders are possible (Program Files, …)
- backslashes “`\`” do not work -\> no shell/env-variables for paths are possible
- no relative path gets resolved “`./..`” -\> absolute path wanted

-\> Kitematic dies the same death on those Paths.

example:

`D:\Github Projects\Testproject 1\>docker.exe -p 8000:80 -v "%cd%\www":/app --name "Test Project1" bananaacid/docker-php7.2-kitematic`

resulting in, but not accepted:

`docker.exe -p 8000:80 -v "D:\Github Projects\Testproject 1\www":/app --name "Test Project1" bananaacid/docker-php7.2-kitematic`

* * *

Same issue on `cmd.exe` as well as `powershell.exe`.

**So `--volume` is actually not usable on windows? Or is there any workaround vor all these problems?**

* * *

edit (partial solution: for drive and backslashes, not spaces):  
since docker is using cygwin internally, all paths have to be converted to cygwin paths (`cygpath`). `$(pwd)` is powershell inserting the current path, executing `$(& ...cygpath "..currentpath..")` for docker to get a unix path:  
tried powershell\>`docker run -p 8000:80 -p 8443:443 --volume "$(& "C:\Program Files\Git\usr\bin\cygpath.exe" "$(pwd)\www")":/app --name TestProject1 bananaacid/docker-php7.2-kitematic`

which does in fact substitute **correctly** , but the space is still not accepted. A path without a space would work. Result so far: `/d/Github Projects/Testproject 1/www/`  
Manually escaping the space with a backspace, does not work either:  
`--volume "/d/Github Projects/Testproject 1/www/":/app`  
`--volume "/d/Github\ Projects/Testproject\ 1/www/":/app`  
`--volume /d/Github\ Projects/Testproject\ 1/www/:/app`  
`--volume "/d/Github Projects/Testproject 1/www/:/app"`

* * *

edit2:  
docker-compose does do resolve

```auto
volumes:
  - ./..:/app

```

with [COMPOSE\_CONVERT\_WINDOWS\_PATHS=1 in `.env`](https://github.com/docker/compose/issues/4303#issuecomment-275214427)

`docker inspect` shows the mounts with correct path, but VOLUMES is still not being set.

-\> no solution yet.

---

<div class="post-metadata">

**Author:** ![ganni](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/ganni/32/21249_2.png) [@ganni](https://forums.docker.com/u/ganni)\
**Post date:** [October 12, 2018, 5:09pm UTC](https://forums.docker.com/t/docker-toolbox-and-windows-paths/60392/2 "2018-10-12T17:09:20Z")

</div>

Hi! check this out!  
see if this works and let me know.  
this just worked for me!  
here is the link for my reply on another post here.

> [@Volume mounts in windows does not work](https://forums.docker.com/t/volume-mounts-in-windows-does-not-work/10693/170):
>
> Hi! I just got it to work on Windows 10 without changing any security settings. Hope it helps somebody! blush docker run -v /User/Documents/directory-to-share-on-host:/dir-on-container image/name ls it’s really strange as if there is some kind of link or shortcut defined for path for current user. I don’t know why but it works just like that! Just drop the /c/Users/username and replace it with /User/ /c/Users/username/directories -\> /User/directories

---

<div class="post-metadata">

**Author:** ![bananaacid](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@bananaacid](https://forums.docker.com/u/bananaacid)\
**Post date:** [February 18, 2019, 10:36am UTC](https://forums.docker.com/t/docker-toolbox-and-windows-paths/60392/3 "2019-02-18T10:36:38Z")

</div>

Since I also have it on drive D, this does not work. As I said: spaces.

`compose up` does not work as well.

Kitematic’s select folder dialog does not work with this as well.

Somewhat of a solution: install the windows `wsl` feature, run the wsl’s bash.exe (not cygwin’s) -\> then `docker.exe .... --volume "/d/Github Projects/Testproject 1/www/" ...` will work (as on OSX)
