Unable to mount host volume through DigitalOcean

I’ve only been using Docker-Machine on my mac so far and it works like a charm.

However, when using the DigitalOcean driver I’m not able to mount a local volume with the -v flag.

I’ve been searching for documentation on weather this is a defect in the driver or what but have been unable to find anything.

Thanks for the help!


To boot up the host I used:

docker-machine create --driver digitalocean --digitalocean-access-token XXXX --digitalocean-ssh-key-fingerprint XXXX --digitalocean-image ubuntu-16-04-x64 DigitalOcean

And I am trying to start with:

docker -it -v “$PWD:/home/user” ubuntu:16.04

Which works fine when using the Parallels driver, it’s only the DigitalOcean driver that seems to be broken.

Setting volume is not listed as one of the options or env variables.

What is the command used?

Is the Docker Machine running and active?

Yes, docker machine is up and running and everything else works exactly as expected. the only issue is that I can’t mount a local folder.
Below are the exact commands to replicate this issue (With my DigitalOcean key redacted)

docker-machine create --driver digitalocean --digitalocean-access-token=XXXX Test
eval "$(docker-machine env Test)"
docker run -it -v “/Users/thoyt:/home/thoyt” ubuntu:16.04

– Inside container –

ls -l /home/thoyt

– Folder is empty –

Following those same instructions, except with the Parallels driver works as expected and mounts the directory.
The only difference between the two sets of commands is the docker-machine driver.

-What is the base OS? For Ubuntu 16.04 specify the base OS as ubuntu-16-04-x64

docker-machine create --driver digitalocean –digitalocean-image ubuntu-16-04-x64 --digitalocean-access-token $DOTOKEN machine-name

-Does the following command also not mount the volume?
docker run -d -v “/Users/thoyt:/home/thoyt” ubuntu:16.04

-Is the folder name /users and not /Users, which is specified?

My OS: OS X - El Capitan (latest)
Digital Ocean Host OS: Ubuntu 16.04 x64
Container Base OS: Ubuntu 16.04 x64 (Have yet to try with another base OS)

The command you asked to try:

docker run -d -v “/Users/thoyt:/home/thoyt” ubuntu:16.04

will not work because there is no command to daemonize, It exits immediately after it starts.

And It is definitely suppose to be a capital ‘U’.

I believe it may be an issue with the DigitalOcean driver as the exact same command set, but using Parallels driver works perfectly.

Please submit an issue at

I found my own answer…

Turns our the ability to share host volumes through docker-machine is a special feature of the Parallels driver.

What the Parallels driver does is mount your home volume into the boot2docker VM under the same path by default,

I’m researching now to try and emulate this behavior with a NFS style setup on AWS.

1 Like

Any news? I’m having the same hellish problem.