[Cialug] Docker Volumes
Andy Denner
linux-list at upeke.com
Sun Nov 6 07:09:28 UTC 2022
For more control over system wide volumes for docker, my understanding
is that you could mount a disk (or simlink) for /var/lib/docker/volume
Another option would be to look into using a volume driver. From there
you could use plugins like sshfs, cifs, or NFS.
Finally you could just set your volume in compose to a local folder
instead of letting docker volumes handle it... something like
https://stackoverflow.com/questions/40905761/how-do-i-mount-a-host-directory-as-a-volume-in-docker-compose<https://stackoverflow.com/questions/40905761/how-do-i-mount-a-host-directory-as-a-volume-in-docker-compose>
/var/lib/docker will also contain all of the container layers and other
cruft of docker as well.
L. V. Lammert wrote on 10/26/2022 4:32 PM:
> I just had to rebuild a system and would REALLY have liked the docuer
> volumes to be stored in speficic location other than root.
>
> First question - how would one restore /var/lib/docker? There is a ton of
> btrfs data there - is that used by docker or the host (which is also
> btrfs)?
>
> Second question - is there way to specify a base path for all volumes in a
> compose file so that those volumes are save in a specific directory NOT
> in root?
>
> It would also serves to separate different docker apps on a system so that
> grabbing that directory gets the compose file AND data volumes.
>
> Any insights would be appreciated!
>
> TIA!
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
More information about the Cialug
mailing list