Docker using ZFS as a standard file system

I have fallen down another linux rabbit hole …

I recently upgraded my server and wanted to use ZFS. I’m running OMV (Debian) with ZFS module.

Everything is working but when I tried to migrate my docker to this machine I saw all kinds of crazy things going on with containers and snapshots (I had 100s by the end of the day and real issues tidying up).

On digging close it seems Docker has explicit support of ZFS, but it needs to be setup in a certain way. I’m not running a support configuration not do I want to change how I do things, I just wanted ZFS as a file system.

Is it possible to force docker just to see ZFS as a regular file system?

I did a bit more researching to this and discovered you could perhaps use another storage driver which would allow you to use ZFS as a more native file system.

however, i felt like a rabbit hole so what I ended up doing was moving my docker location back to the hosts primary drive which isn’t ZFS and then just pointed my volumes at my ZFS drive. This gives me pretty much what I need as my dockers get backed up through my XCP-NG snapshots and backups and my ZFS data through my ZFS snapshots and backups.

Had this working a few days now and it seems to work well.

I’m sure if I had the time I could get the whole thing working on ZFS but I just need it to work for now.