Merge branch 'fix-docker' into 'master'

Fix docker

See merge request fablab/labsync!29
This commit is contained in:
jalr 2018-06-06 22:53:23 +00:00
commit b204cc06c4
2 changed files with 12 additions and 3 deletions

View file

@ -2,14 +2,22 @@
vg='vglab'
# nothing needs to be done if previous data in overlay present
[ -d /var/lib/docker ] && exit 0
# remove LV if exists
if lvs $vg/docker-thinpool > /dev/null 2>&1; then
lvremove -y $vg/docker-thinpool
fi
if ! lvs -o layout --noheadings $vg/docker-thinpool | grep -q 'thin,pool'; then
if ! lvs -o LV_NAME --noheadings | grep -q docker-thinpool; then
lvcreate --wipesignatures y -n docker-thinpool "$vg" -l 10%VG
lvcreate --wipesignatures y --yes -n docker-thinpool "$vg" -l 10%VG
fi
if ! lvs -o LV_NAME --noheadings | grep -q docker-thinpoolmeta; then
lvcreate --wipesignatures y -n docker-thinpoolmeta "$vg" -l 1%VG
lvcreate --wipesignatures y --yes -n docker-thinpoolmeta "$vg" -l 1%VG
fi
lvconvert -y \
@ -46,4 +54,4 @@ cat > /etc/docker/daemon.json << EOF
]
}
EOF
mkdir -m 711 /var/lib/docker

View file

@ -101,6 +101,7 @@
"echo '/etc/resolv.conf' >> /tmp/ignore_files",
"echo '/etc/hostname' >> /tmp/ignore_files",
"echo '/etc/hosts' >> /tmp/ignore_files",
"echo '/var/lib/docker' >> /tmp/ignore_files",
"mkdir -p /tmp/extra/tmp /tmp/extra/proc /tmp/extra/sys /tmp/extra/etc"
]
},