LXD & docker & filesystem

I have to test some projects which only come with docker installation instructions. On our faculties server (ubuntu 22.04) I have and LXD environment with ZFS underneath to test all kind of stuff in these nice containers. According to the docs , docker doesn’t play nicely with ZFS, so to be on the safe side, is it best to foresee a ext4 partition, or btrfs to run the containers where I can start docker inside? I am a bit hesitant to install yet another complex filesystem on that server like btrfs.

thanks for the advice

Jef Peeraer

You can use the LXD lvm driver which allows snapshots, but because it uses a block backed volume it exposes ext4 to the actual instance (which means you can then use overlayfs with docker).

Alternatively the btrfs driver works with LXD and docker (it creates nested BTRFS subvolumes), but do take note of:

Also see:

can’t we use ZFS and volumes to achieve the same thing ? Would be easier , just create a ZFS volume with an ext4 on it…

You cannot at the moment, but its on our roadmap for this cycle to add ZFS block volume support for containers.

Hi, you could try this in the mean time whilst waiting for container block volume support:

Be warned that Docker Swarm in an unprivileged system container is an abyss of complexity issues.

1 Like