I am not looking to save or commit docker images or containers. This is a question on how to save files (e.g., to drive configs which can be volume mounted on docker containers).
I am looking for a way to save files on the docker host filesystem which will survive docker restarts e.g., boot2docker down
+ boot2docker up
.
That would be using volumes (docker volumes create/ls/...
):
--volumes-from
), part of the disk.vmdk
which is the boot2docker VM disk stored on host. /var/lib/docker/volumes
. That will survive a boot2docker session (docker-machine stop/start
)If you really need to backup them directly on the host (outside the virtual disk), you can copy /var/lib/docker/volumes
to /c/Users/...
(or /Users/...
).
A docker volume ls
combined with docker volume inspect
will list the folders within /var/lib/docker/volumes
that you need to consider for backup.