From 302a857328564796a6546bcc6a310b89e44939e2 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Sun, 20 Mar 2022 15:38:49 +0100 Subject: [PATCH] Update docker --- plugins/docker | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/docker b/plugins/docker index 26d69b3..361e354 100644 --- a/plugins/docker +++ b/plugins/docker @@ -27,8 +27,12 @@ done shift $((OPTIND-1)) # create zfs filesystems -zfs create -o com.sun:auto-snapshot=false -o mountpoint=/var/lib/docker $ZPOOL/docker -zfs create -o com.sun:auto-snapshot=true -o mountpoint=/portainer $ZPOOL/portainer +if [ ! $(zfs list $ZPOOL/docker) ]; then + zfs create -o com.sun:auto-snapshot=false -o mountpoint=/var/lib/docker $ZPOOL/docker +fi +if [ ! $(zfs list $ZPOOL/portainer) ]; then + zfs create -o com.sun:auto-snapshot=true -o mountpoint=/portainer $ZPOOL/portainer +fi # add docker repository apt-key adv --fetch-keys https://download.docker.com/linux/debian/gpg @@ -40,7 +44,7 @@ DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -qq --no- # install portainer cd /portainer -mkdir data +mkdir -p data cat << EOF > /portainer/docker-compose.yml version: '3.2' services: