boot2docker / boot2docker

DEPRECATED; see https://github.com/boot2docker/boot2docker/pull/1408
https://github.com/boot2docker/boot2docker/pull/1408
Apache License 2.0
8.33k stars 1.29k forks source link

Mount volumes in boot2docker #1046

Open hernanm92 opened 9 years ago

hernanm92 commented 9 years ago

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.

puco commented 8 years ago

+1