diff --git a/configs/build-golden.sh b/configs/build-golden.sh index cc2092d..235fb8b 100644 --- a/configs/build-golden.sh +++ b/configs/build-golden.sh @@ -91,7 +91,9 @@ pct exec "$VMID" -- bash -c 'mkdir -p /etc/docker; cat > /etc/docker/daemon.json } JSON' echo "[golden] verifying Docker works in the build guest (storage driver should be overlay2 on the ext4 data volume) …" -pct exec "$VMID" -- bash -c 'systemctl start docker; sleep 2; docker run --rm hello-world >/dev/null && echo " docker OK ($(docker info 2>/dev/null | sed -n "s/.*Storage Driver: //p"); data-root $(docker info 2>/dev/null | sed -n "s/.*Docker Root Dir: //p"))"' +# RESTART (not start): docker-ce auto-starts on install with the DEFAULT config, so it is already +# running by now; only a restart picks up the daemon.json just written (overlay2 + log caps). +pct exec "$VMID" -- bash -c 'systemctl restart docker; sleep 3; docker run --rm hello-world >/dev/null && echo " docker OK ($(docker info 2>/dev/null | sed -n "s/.*Storage Driver: //p"); data-root $(docker info 2>/dev/null | sed -n "s/.*Docker Root Dir: //p"))"' # Guard: the image store MUST be on the data volume now. /var/lib/containerd holding the images would # mean containerd-snapshotter is still on (the split would leave images on the rootfs). pct exec "$VMID" -- bash -c 'drv=$(docker info 2>/dev/null | sed -n "s/.*Storage Driver: //p"); [ "$drv" = "overlay2" ] || { echo "[golden] FATAL: storage driver is $drv, expected overlay2 — images would not land on the data volume"; exit 1; }'