Restore Docker static Qt build target

ober

e09f9f90b5fc117ef870fc7b82f071efa2abf5cf

diff --git a/Dockerfile.qt b/Dockerfile.qt
index ddd731b..93600b2 100644
--- a/Dockerfile.qt
+++ b/Dockerfile.qt
@@ -1,4 +1,4 @@
-# Podman-compatible container recipe for building static jemacs-qt with Qt6.
+# Docker recipe for building a fully static jemacs-qt with Qt6.
 #
 # Multi-stage build:
 #   Stage 1 (Alpine):          Build Qt6 static, QScintilla, tree-sitter, libvterm (musl)
@@ -6,11 +6,13 @@
 #   Stage 2 (jerboa21/jerboa): Copy Qt artifacts + Jerboa deps, build jemacs-qt
 #
 # Usage:
-#   podman build -f Dockerfile.qt -t jemacs-qt-builder .
-#   id=$(podman create jemacs-qt-builder)
-#   podman cp $id:/out/jemacs-qt ./jemacs-qt && podman rm $id
+#   docker build -f Dockerfile.qt -t jemacs-qt-builder .
+#   id=$(docker create jemacs-qt-builder)
+#   docker cp $id:/out/jemacs-qt ./jemacs-qt && docker rm $id
 #   chmod +x jemacs-qt
 
+ARG JERBOA_IMAGE=jerboa21/jerboa
+
 # ── Stage 1: Build Qt6 + QScintilla + tree-sitter + libvterm on Alpine ───────
 FROM alpine:3.21 AS qt-alpine
 
@@ -245,7 +247,7 @@ RUN mkdir -p /tmp/qt-shim-out && \
     ls -lh /tmp/qt-shim-out/
 
 # ── Stage 2: jerboa21/jerboa + Qt artifacts → build jemacs-qt ────────────────
-FROM jerboa21/jerboa AS builder
+FROM ${JERBOA_IMAGE} AS builder
 
 # Install Ubuntu build deps needed for jemacs-qt compilation
 RUN apt-get update && apt-get install -y --no-install-recommends \
diff --git a/Makefile b/Makefile
index 6e77969..eb29469 100644
--- a/Makefile
+++ b/Makefile
@@ -149,6 +149,7 @@ export CHEZ_DIR
         test-vtscreen test-debug-repl test-qt test-qt-e2e build-qt binary-qt \
         test-pty test-emacs test-functional test-term-hang \
         podman-deps ensure-podman-deps static-qt static-tui clean-podman check-podman check-root \
+        check-docker docker-static-qt \
         check-static-qt-local-deps \
         linux-static-qt-podman linux-static-tui-podman \
         build-jemacs-qt-static build-jemacs-tui-static binary macos \
@@ -177,7 +178,7 @@ all:
 	@echo "  binary         Build TUI binary (./jemacs) — embeds Scheme, links system libs"
 	@echo "  jemacs-jerbuild Build host TUI launcher via 'jerbuild build' (.jerbuild)"
 	@echo "  static-tui     Build static TUI binary on this Linux host (./jemacs)"
-	@echo "  static-qt      Build static jemacs-qt binary on this Linux host"
+	@echo "  static-qt      Build fully static jemacs-qt binary via Docker"
 	@echo "  linux-amd64    Build Linux amd64 TUI artifact via jerbuild (local Linux or SSH)"
 	@echo "  linux-arm64    Build Linux arm64 TUI artifact via jerbuild on a Linux arm64 host"
 	@echo "  freebsd-amd64  Build FreeBSD amd64 TUI artifact via jerbuild on FreeBSD"
@@ -791,6 +792,11 @@ PODMAN  ?= podman
 PODMAN_PLATFORM ?= linux/amd64
 PODMAN_BUILD_FLAGS ?=
 PODMAN_RUN_FLAGS ?=
+DOCKER ?= docker
+DOCKER_PLATFORM ?= linux/amd64
+DOCKER_BUILD_FLAGS ?=
+JERBOA_IMAGE ?= jerboa21/jerboa
+STATIC_QT_IMAGE ?= jemacs-qt-builder
 
 # Dependency source directories (vendored clones)
 JERBOA_SRC   ?= $(JERBOA)
@@ -832,6 +838,10 @@ check-podman:
 	@echo "ERROR: container builds are disabled for this project; use static-qt/static-tui on a prepared Linux host." >&2
 	@exit 1
 
+check-docker:
+	@command -v $(DOCKER) >/dev/null 2>&1 || \
+	  { echo "ERROR: Docker executable '$(DOCKER)' not found. Install Docker or set DOCKER=/path/to/docker."; exit 1; }
+
 # Disabled legacy container dependency image target.
 # Takes ~45-60 min: Qt6 static + QScintilla + Chez Scheme + all shims.
 CHEZ_COMMIT ?= 902a10098603481afce0ec8588114234c09d6318
@@ -853,8 +863,25 @@ ensure-podman-deps: check-podman
 	@$(PODMAN) image exists $(DEPS_IMAGE) || \
 	  { echo "Deps image '$(DEPS_IMAGE)' not found; building with 'make podman-deps'."; $(MAKE) podman-deps; }
 
-# Static Qt binary on the target Linux host.
-static-qt: check-static-qt-local-deps linux-qt-local
+# Fully static Qt binary via Docker. Dockerfile.qt builds static Qt,
+# QScintilla, tree-sitter, and the Qt shim from source, then uses the
+# DockerHub jerboa base image for the final musl-linked jemacs-qt build.
+static-qt: docker-static-qt
+
+docker-static-qt: check-docker
+	@echo "=== Building jemacs-qt static binary with Docker ==="
+	$(DOCKER) pull $(JERBOA_IMAGE)
+	$(DOCKER) build $(DOCKER_BUILD_FLAGS) --platform $(DOCKER_PLATFORM) \
+	  --build-arg JERBOA_IMAGE="$(JERBOA_IMAGE)" \
+	  --build-arg JEMACS_FEATURES="$(JEMACS_FEATURES)" \
+	  -f Dockerfile.qt -t $(STATIC_QT_IMAGE) .
+	@id=$$($(DOCKER) create $(STATIC_QT_IMAGE)) && \
+	  trap '$(DOCKER) rm $$id >/dev/null 2>&1 || true' EXIT INT TERM && \
+	  $(DOCKER) cp $$id:/out/jemacs-qt ./jemacs-qt
+	@chmod +x jemacs-qt
+	@echo ""
+	@ls -lh jemacs-qt
+	@file jemacs-qt
 
 linux: linux-amd64