1

I have installed docker toolbox on my Windows PC,when i install containers on it using Kitematic, I want to share a folder with my local machine. However docker runs in virtualbox on the default machine in VirtualBox.

So, i guess i first have to do a fvolume share of the virtualbox vm with my local machine and then a second share of the docker container with the folder that I shared in virtualbox. Could someone assist me in this please?

Arjun Sehgal
  • 59
  • 1
  • 8

2 Answers2

0

No, you shouldn't need to share any more folder: docker-machine will create a VM which auto-mount C:\Users\<yourLogin>.

docker-machine ls
docker-machine ssh default
cd /C/Users/<yourLogin>

You can mount other folders from your hosts, but you don't have to.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the information. But when specifying the folder path for containers like mysql or mongodb should we just point to the /C/Users/ path? – Arjun Sehgal May 27 '16 at 18:17
  • @ArjunSehgal No, you don't specify any path, you create named volume (with docker 1.9+) with `docker volume create` (http://stackoverflow.com/a/37462890/6309): https://docs.docker.com/engine/userguide/containers/dockervolumes/#mount-a-shared-storage-volume-as-a-data-volume – VonC May 27 '16 at 18:46
  • @ArjunSehgal I explain it (for mongodb) at the *end* of my older answer: http://stackoverflow.com/a/35402611/6309 – VonC May 27 '16 at 18:47
0

I'm running docker version 18.03.0 ce on Windows 10, and the C:\Users folder is shared as /c-users on the docker VM (default), so using the command line

docker run -it -v /c-users/my_windows_user/project:/media/project ubuntu:16.04 bash

I can access the Windows project files from /media/project within the Ubuntu container

kevstev01
  • 330
  • 5
  • 13