-3

But I want to mount /d because I like to put my projects on /d.

Jermyn Xia
  • 87
  • 6

1 Answers1

2

docker-machine uses a boot2docker.iso VM image, based on TinyCore

The original boot2docker project mentioned that you can mount other folders with, at runtime:

mount -t vboxsf -o uid=1000,gid=50 your-other-share-name /some/mount/location

Issue 1814 of docker-machine suggests that, and it seems to work.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I has try to add this script to rc.d/, but the script disappears when I restart the machine. – Jermyn Xia Nov 19 '15 at 08:36
  • @JieMinXia try first to type it manually once you have ssh to the boot2docker VM. If that works, what I usually do an `ssh cp` before the interactive `ssh`: for example (not related to sharing folders, but the same idea applies): https://github.com/VonC/b2d/blob/1a3a147bb59a209f1cedd0c37c4a2cddef3d6ea5/b2d.bat#L20-L24 – VonC Nov 19 '15 at 08:38