# Map windows directory to docker container

**URL:** <https://forums.docker.com/t/map-windows-directory-to-docker-container/5715>\
**Category:** General\
**Tags:** docker\
**Created:** [January 19, 2016, 10:00pm UTC](https://forums.docker.com/t/map-windows-directory-to-docker-container/5715 "2016-01-19T22:00:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jigs040](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jigs040](https://forums.docker.com/u/jigs040)\
**Post date:** [January 19, 2016, 10:00pm UTC](https://forums.docker.com/t/map-windows-directory-to-docker-container/5715/1 "2016-01-19T22:00:37Z")

</div>

Hello Everyone,

I’m new to docker. i have seen some answer online on forum to map windows directory to docker container. Basically i’m trying to map my windows directory using command “docker run -v //c/users/username/junos:/usr/src carrozzi/juise:latest”. So i can run slax script on container as i’m running on juise CLI. Am i doing something wrong with command or i need any further step? Any help on this would be appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![davidshen84](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/davidshen84/32/3968_2.png) [@davidshen84](https://forums.docker.com/u/davidshen84)\
**Post date:** [January 20, 2016, 2:42am UTC](https://forums.docker.com/t/map-windows-directory-to-docker-container/5715/2 "2016-01-20T02:42:08Z")

</div>

On Windows, you can not directly map Windows directory to your container. Because your containers are reside inside a VirtualBox VM. So your `docker -v` command actually maps the directory between the VM and the container.

So you have to do it in two steps:

1. Map a Windows directory to the VM through VirtualBox manager
2. Map a directory in your container to the directory in your VM

You better use the Kitematic UI to help you. It is much eaiser.

---

<div class="post-metadata">

**Author:** ![jigs040](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jigs040](https://forums.docker.com/u/jigs040)\
**Post date:** [January 28, 2016, 6:15pm UTC](https://forums.docker.com/t/map-windows-directory-to-docker-container/5715/3 "2016-01-28T18:15:45Z")

</div>

Hi Xi ,

Thanks for your reply.

I have set windows directory path in VirtualBox in Shared folder. I also map container directory using this command “docker run -v /c/Users/username/junos:/usr/src carrozzi/juise:latest”. But still problems remains same when i tried to execute script. Please assist me on this if i’m doing something wrong on mapping windows directory to container directory.

---

<div class="post-metadata">

**Author:** ![davidshen84](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/davidshen84/32/3968_2.png) [@davidshen84](https://forums.docker.com/u/davidshen84)\
**Post date:** [January 29, 2016, 3:23am UTC](https://forums.docker.com/t/map-windows-directory-to-docker-container/5715/4 "2016-01-29T03:23:18Z")

</div>

Hi Jay,

Did the command succeed, but did not map the volume? What was the particular error/symptom?

If you do

```
docker-machine ssh default

```

Can you see the mapped volume from within the VM?

Thanks~

---

<div class="post-metadata">

**Author:** ![jigs040](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jigs040](https://forums.docker.com/u/jigs040)\
**Post date:** [January 31, 2016, 4:00am UTC](https://forums.docker.com/t/map-windows-directory-to-docker-container/5715/5 "2016-01-31T04:00:47Z")

</div>

Yes command succeed. Doesn’t shows up any error on terminal.

When i did “docker-machine ssh default” and applied “ls” command nothing shows up on the terminal. so i can’t see mapped volume within the VM.

---

<div class="post-metadata">

**Author:** ![boistordu](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@boistordu](https://forums.docker.com/u/boistordu)\
**Post date:** [April 3, 2016, 2:13am UTC](https://forums.docker.com/t/map-windows-directory-to-docker-container/5715/6 "2016-04-03T02:13:47Z")

</div>

sorry to ask you that, but I’m new to docker and I have my system on ssd And I need to mount then a directory on a bigger disk on a container that I’ve downloaded in the hub.  
So I’ve had the directory in the shared folders in the default vm in virtualbox manager and now I don’t really know what to do next. You said to use kitematic but kitematic only accept subfolders of c:\Users… so how to do it here? And shouldn’t I need to map in fstab or something of the default vm the new directory that I’ve put in the virtualbox manager?  
thanks  
best regards
