Move Docker to ZFS

systemctl stop docker

zfs create -o syncoid:sync=none pool/docker
rsync -avP /var/lib/docker/ /pool/docker/
rm -rf /var/lib/docker/*
zfs set mountpoint=/var/lib/docker pool/docker

apt install -y jq moreutils
CONFIG_FILE="/etc/docker/daemon.json"
[ -e "${CONFIG_FILE}" ] || echo "{}" > "${CONFIG_FILE}"
jq '."storage-driver" = "zfs"' < "${CONFIG_FILE}" | sponge "${CONFIG_FILE}"

systemctl start docker

docker info | grep -E '^Storage Driver:'