It seems that is not possible to mount a volume in boot2docker, after stopping boot2docker it is not longer mounted.
In VirtualBox I mounted /var/cache to the boot2docker-vm image (Settings -> shared folders) with 'Auto-mount' and 'Make Permanent' options.
It seems that is not possible to mount a volume in boot2docker, after stopping boot2docker it is not longer mounted. In VirtualBox I mounted /var/cache to the boot2docker-vm image (Settings -> shared folders) with 'Auto-mount' and 'Make Permanent' options.
Versions:
VirtualBox: 4.3.30 Boot2Docker-cli version: v1.8.0 Docker version: Client: 1.8.1, Server: 1.8.1
Example using boot2docker command:
boot2docker init boot2doker up boot2docker ssh sudo mount -t vboxsf Cache /var/cache df -h (/var/cache is mounted) exit boot2docker save boot2docker up boot2docker ssh df -h (/var/cache is mounted) exit boot2docker stop boot2docker up boot2docker ssh df -h (/var/cache isn't mounted)
Its not only with volumes, any change in the boot2docker image, after a stop its rollbacked.