Docker
It is possible to configure the Docker data-root to be placed in a directory on a ZFS storage pool. In this case, Docker will use the 'zfs' storage driver. This driver creates a separate dataset for each image layer. Because of this, here is our recommendation for setting up Docker using directory:
First, create a docker user share configured as follows:
- Share name: Docker
- Use cache pool: Only
- Select cache pool: name of your ZFS pool
Next, on Docker settings page:
- Enable Docker: Yes
- Docker data-root: directory
- Docker directory: /mnt/user/docker
If you ever need to delete the persistent docker state, bring up the Docker settings page, set Enable Docker to No, and click Apply. After Docker has shut down, click the Delete directory checkbox and then click Delete. This will result in deleting not only the various files and directories, but also all layers stored as datasets.
Before enabling Docker again, be sure to first re-create the docker share as described above.