• Go 83.8%
  • Shell 16.2%
Find a file
2026-04-17 14:23:51 +02:00
zfs Automatically scope volume names with the provided dataset 2021-02-19 16:46:57 -05:00
.gitignore add make script, add metalinter config, and LINT 2018-10-25 14:58:44 -04:00
.gometalinter.json add make script, add metalinter config, and LINT 2018-10-25 14:58:44 -04:00
.travis.yml switch from dep to go modules 2020-02-21 08:03:28 -05:00
docker-zfs-plugin.service update docs and example systemd service 2018-10-25 09:53:40 -04:00
docker-zfs-plugin.socket increment version 2020-02-21 08:46:07 -05:00
go.mod Lower go version requirement to 1.13 2021-03-17 20:52:40 +00:00
go.sum support graceful shutdown 2020-02-24 09:42:02 -05:00
LICENSE.md add license 2019-11-12 08:52:27 -05:00
main.go add option to read dataset-name from file in /etc 2026-04-17 14:23:51 +02:00
make.sh add make script, add metalinter config, and LINT 2018-10-25 14:58:44 -04:00
README.md Add justification for project in README.md 2021-03-17 20:51:54 +00:00

docker-zfs-plugin

This is an opinionated fork of TrilliumIT/docker-zfs-plugin that philosophically disagrees with the parent project about the use of fully-qualified dataset names. In particular, this fork does not require (or even accept) them. Instead, when launching the plugin, a parent dataset is passed in. All further requests to the plugin are scoped underneath that dataset.

FAQ

But why?

Portability. If you have multiple nodes, they may very well use distinct tank names. (In fact, this is recommended practice according to ZFS devs). With the parent project's version, you would have to have node-specific configuration for each container/service, which kind of defeats the purpose of using the plugin altogether. If you were going to be editing your docker-compose file for each node, why not just do a local bind mount for its mount point?

What if I want to use different parent datasets for different containers?

Just run multiple instances of the plugin, registered with Docker under different names.

Installation

Download the latest binary from Github releases and place it in /usr/local/bin/.

If using a systemd based distribution, copy docker-zfs-plugin.service to /etc/systemd/system. Then enable and start the service with systemctl daemon-reload && systemctl enable docker-zfs-plugin.service && systemctl start docker-zfs-plugin.service.

Usage

After the plugin is running, you can interact with it through normal docker volume commands.

Recently, support was added for passing in ZFS attributes from the docker volume create command:

docker volume create -d zfs -o compression=lz4 -o dedup=on
--name=tank/docker-volumes/data