I have seen that the latest version of boot2docker has provided guest addition by default. It allows you to mount your home directory under /Users which is nice. However, I would like to mount more than 1 directory for my purpose. Assuming the path i want to add are /location/folder1 and /location/folder2, I have followed these steps:
I have created the Virtual Machine mount points like this:
VBoxManage sharedfolder add boot2docker-vm -name name1 -hostpath /location/folder1 VBoxManage sharedfolder add boot2docker-vm -name name2 -hostpath /location/folder2
Then i ran boot2docker ssh and edited /etc/rc.d/automount-shares to add
try_mount_share /location/folder1 'name1' try_mount_share /location/folder2 'name2'
I ran the following:
sudo /etc/rc.d/automount-shares
I happily mounts the folder which I want.
Then, I do exit and boot2docker save
to save the state of my changes. This works very well until I restart my machine. But the moment, I restart the host, everything is lost.
Is there a way I can persist the mountings ?
P.S. - I have added the guest addition and stored this folder for boot2docker 1.2 where you work around Dockerfile and create your custom iso but I am looking for a cleaner approach here since guest edition feature is available already.
Any help is really appreciable.