aboutsummaryrefslogtreecommitdiffstats
path: root/image-builder/lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'image-builder/lib.sh')
-rw-r--r--image-builder/lib.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/image-builder/lib.sh b/image-builder/lib.sh
index dfb076b..8a22828 100644
--- a/image-builder/lib.sh
+++ b/image-builder/lib.sh
@@ -72,6 +72,15 @@ txz_hash() {
done <<< "$files" | sha256sum | cut -d' ' -f1
}
+# require_docker
+# Assert the docker daemon answers before any variant is attempted. A dead
+# daemon is global, not per-variant: without this each variant "fails and
+# continues", the digest probes read as "no digest, rebuild to be safe", and
+# cron logs warnings nightly while nothing is ever built. Fail loudly once.
+require_docker() {
+ docker info >/dev/null 2>&1 || _err "docker daemon not reachable; is dockerd running?"
+}
+
# require_mount VERSION
# Assert the NAS tree for VERSION is mounted (file:// mirror only).
# x86_64 tree dir is slackware64-${VERSION}.