- Dockerfile 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
jasonjgardner blockbench-mcp-plugin headless .bbmodel server bridged to streamable HTTP by supergateway; sourced from the mirrors archive tarball so builds never touch GitHub. Pushed as containers/blockbench-mcp <plugin-version>-<sha7> and pulled by ansible-roles/blockbench — on-host builds cannot reach git.boxcar.sh from build containers on hosts where the name resolves to the host-local caddy. Agent: pi |
||
| caddy | ||
| Containerfile | ||
| Containerfile.mcp | ||
| LICENSE | ||
| README.md | ||
containers/blockbench
Container images for Blockbench, the low-poly 3D
model editor — the official web build compiled from source and served
statically by caddy, plus a headless MCP sidecar. Consumed by the
blockbench Ansible role (ansible-roles/blockbench), which deploys both as
a rootless Podman pod behind the fleet caddy.
- Upstream: https://github.com/JannisX11/blockbench (GPL-3.0)
- Mirror: https://git.boxcar.sh/mirrors/blockbench (synced every 8h)
- MCP plugin: https://github.com/jasonjgardner/blockbench-mcp-plugin (MIT), mirror https://git.boxcar.sh/mirrors/blockbench-mcp-plugin
- Web app docs:
npm run serve/npm run build-webin the upstream README; the PWA service worker comes from upstreamscripts/generate_pwa.js
Images
| File | Image | Tag scheme |
|---|---|---|
Containerfile |
git.boxcar.sh/containers/blockbench |
<upstream tag>-<commit sha7> e.g. 5.2.3-0602f26 |
Containerfile.mcp |
git.boxcar.sh/containers/blockbench-mcp |
<plugin-version>-<sha7> e.g. 1.10.1-16d3631 |
Web app image layout
Multi-stage:
- build —
ubi10/nodejs-22-minimal(digest-pinned): downloads a pinnedmirrors/blockbenchcommit as a Forgejo archive tarball, verifies its sha256, runsnpm ci && npm run build-web && node scripts/generate_pwa.js. - runtime — official
caddyimage (digest-pinned):COPY --from=buildthe static payload (index.html,dist/bundle.js,css/ lib/ font/ lang/ themes/ keymaps/ assets/ icons/, manifests,service_worker.js) into/pub, drops bundle sourcemaps, serves on:8080(plain HTTP; TLS terminates on the host caddy). Runs as uid 1000 with awgethealthcheck against/healthz.
Base-image policy note: no official upstream Blockbench container exists, so
per ci/docs/onboarding-new-container.md the builder is Red Hat UBI
(ubi10/nodejs-22-minimal) and the runtime extends the official upstream
caddy image (the "caddy model"). The build stage is toolchain-only; the served
payload is upstream GPL-3.0 code plus generated artifacts.
MCP sidecar image layout
Single stage from ubi10/nodejs-22-minimal (digest-pinned): npm install -g
of the pinned mirrors/blockbench-mcp-plugin Forgejo archive tarball (the
package pulls bun itself; no GitHub access, no git client needed) plus
supergateway. Runs uid 1000; the role mounts the model workspace at
/models and overrides the command with the deployment's --web-app-url, so
write-tool results link back to the fleet web app. Render tools need
Node 23.6+/WebGPU and are not functional in this image; all other tools are.
Why prebuilt + pushed instead of on-host builds: build containers cannot
reach git.boxcar.sh on hosts where the name is pinned to the host-local
caddy (it resolves to ::1 on orientpoint), while registry pulls work —
the same reasoning as the web image.
Build the image
These examples are executable documentation. Keep them working.
# Default build (pins committed in the Containerfile)
podman build -t localhost/blockbench:dev .
# Release build — explicit pins for every input
podman build \
--build-arg BLOCKBENCH_REF=0602f263ae3b9b0377b2614e7d86a29dbe0e8ee6 \
--build-arg BLOCKBENCH_SHA256=ceb4663410a7db94a4ad2207280828261342bbc7a760e78f00645695357de8f3 \
--build-arg NODE_IMAGE=registry.access.redhat.com/ubi10/nodejs-22-minimal@sha256:fba81f776c72b0413e27eccb95bcb1c9f8c989924621185f4ecc73efced78f04 \
--build-arg CADDY_IMAGE=docker.io/library/caddy@sha256:04913b1da43339a40ad1ea87827d70a576ac5aa6cf674c6e24fdca675887533a \
-t git.boxcar.sh/containers/blockbench:5.2.3-0602f26 .
Smoke test:
podman run --rm -p 18080:8080 localhost/blockbench:dev
curl -fsS http://127.0.0.1:18080/healthz # -> ok
curl -fsSI http://127.0.0.1:18080/ | head -1 # -> HTTP/1.1 200 OK
curl -fsSI http://127.0.0.1:18080/dist/bundle.js | head -1
curl -fsSI http://127.0.0.1:18080/lang/en.json | head -1
Then open http://127.0.0.1:18080/ in a browser and confirm the editor
boots (start screen renders, no console 404s).
Releasing
- Pick the release tag in
mirrors/blockbench(tags sync from upstream) and take its commit SHA:git ls-remote --tags https://git.boxcar.sh/mirrors/blockbench | grep vX.Y.Z - Hash the archive:
curl -fsSL https://git.boxcar.sh/mirrors/blockbench/archive/<sha>.tar.gz | sha256sum - Resolve current base digests:
podman pullbothARGimages, thenpodman inspect --format '{{.Digest}}' <image> - Update
ARGdefaults in theContainerfileand the README examples, tag the image<version>-<sha7>(e.g.5.2.3-0602f26), push:podman push git.boxcar.sh/containers/blockbench:5.2.3-0602f26 - Update
blockbench_image_taginansible-roles/blockbenchdefaults.
MCP sidecar release (same flow, Containerfile.mcp):
git ls-remote --tags https://git.boxcar.sh/mirrors/blockbench-mcp-plugin | grep vX.Y.Z
curl -fsSL https://git.boxcar.sh/mirrors/blockbench-mcp-plugin/archive/<sha>.tar.gz | sha256sum
podman build -f Containerfile.mcp \
--build-arg BLOCKBENCH_MCP_REF=<sha> \
--build-arg SUPERGATEWAY_VERSION=4.2.0 \
-t git.boxcar.sh/containers/blockbench-mcp:<version>-<sha7> .
podman push git.boxcar.sh/containers/blockbench-mcp:<version>-<sha7>
# then bump blockbench_mcp_image_tag in ansible-roles/blockbench
Smoke test the sidecar (models volume required; the server creates files in the root it is given):
podman volume create bbmcp-smoke
podman run -d --name bbmcp-smoke --userns keep-id:uid=1000,gid=1000 \
-v bbmcp-smoke:/models \
localhost/blockbench-mcp:dev
podman exec bbmcp-smoke curl -s -X POST http://127.0.0.1:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}' \
| head -c 200 # -> serverInfo blockbench-mcp-headless
podman rm -f bbmcp-smoke && podman volume rm bbmcp-smoke
Rebuilds of the same pins reproduce the served payload byte-for-byte
(esbuild output is deterministic for the same inputs; npm ci is locked by
package-lock.json). SOURCE_DATE_EPOCH is set for tool metadata; the image
creation timestamp itself follows the builder's OCI behavior.
License
- Upstream Blockbench is GPL-3.0 — the served payload is unmodified upstream
source plus its own build artifacts (see
LICENSE.MDin the upstream repo and mirror). - Container packaging (Containerfile, caddy config) follows the fleet conventions; caddy is Apache-2.0.