Delay Docker until after ZFS init

SystemD standalone service

[Unit]
Description=Wait for ZFS before starting Docker
RequiredBy=docker.service
Before=docker.service
Requires=zfs.target
After=zfs.target
[Service]
Type=oneshot
ExecStart=/bin/true
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

Docker service edit

  1. sudo systemctl edit docker.service

  2. Add the following contents:

docker.service
After=zfs-mount.service 
Requires=zfs-mount.service 
Wants=zfs-mount.service 
BindsTo=zfs-mount.service

Last updated