1

I'm trying to use rootless docker, but when pulling and image, docker is trying to use zfs as the storage driver. I can confirm that docker info shows the zfs driver. I didn't intend or configure that anywhere. My OS isn't defaulted to zfs (btrfs the the root, boot etc). My home directory is in a mounted zfs.

The instructions for zfs in docker explains how to use the daemon.json to set the storage driver. However, it doesn't exist for me, which is expected, but I see no equivalent config in my system that does so. The ~/.docker/config.json has nothing about storage drivers.

Is the fact that my home directory (and the rootless docker directories) are in a mounted zfs location enough to force that as the storage driver? Is there any way to have rootless docker use a different storage driver, maybe by pointing my rootless install to another location that isn't a zfs backed directory?

beauk
  • 43
  • 5
  • for others to find this easier, this is the docker / zfs error: `docker: failed to register layer: exit status 1: "/sbin/zfs fs create -o mountpoint` (People see similar errors for docker for other permission issues as well. – beauk Nov 05 '22 at 20:39

1 Answers1

1

I confirmed that moving the location of ~/.local/share/docker was enough to stop using the zfs storage driver. I made that directly into a soft link to /var/docker_rootless, and all worked. Even docker info reports using the overlay2 storage driver now.

notes on exact steps to resolve:

  1. stopped docker service first.
  • systemctl --user stop docker.service
  1. also made /var/docker_rootless owned by my user that is running rootless docker.
  • sudo mkdir /var/mynewdir; sudo chown $(whoami):$(whoami) /var/mynewdir
  1. moved the original docker folder
  • mv ~/.local/share/docker ~/.local/share/docker.bak
  1. created the link
  • ln -s /var/mynewdir ~/.local/share/docker
  1. Coppied the old folder contents to the new directory.
  • rsync -A ~/.local/share/docker.bak/ ~/.local/share/docker
beauk
  • 43
  • 5