feat: build clients locally on a published base #56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/local-client-layer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
publish-imageshas never published anything. On the arm64 runner, theamd64 build of Claude Code runs
claude install, a Bun executable,under qemu-x86_64. It aborts with
ASSERTION FAILED: MemoryExhaustion(exit 134). This is a known Bun 1.4limitation under qemu-user that its maintainers will not fix
(https://github.com/oven-sh/bun/issues/41087). OpenCode is a Bun
executable too. Meanwhile installers and launches on Linux amd64 and
arm64 pull client images that do not exist.
The base stage builds fine under emulation, so this change splits the
images: the forge publishes only the shared base, and every host builds
its client layer on it natively. Two alternatives were set aside. A
second native amd64 runner needs infrastructure. Installing Claude Code
without running it would copy Anthropic's download layout into the
Dockerfile and still leave OpenCode exposed.
What changed
The workflow builds the Dockerfile's base target from scratch for
linux/amd64 and linux/arm64 and publishes
git.unitoo.it/claudiomaradonna/azkaban-base:latest. No client isbuilt or run on the runner. Each nightly run produces a new base.
The client targets now start
FROM ${BASE_IMAGE}. Each records thebase's ID in an
azkaban.baselabel. On Linux amd64 and arm64:./install.shpulls the base and builds the selectedclients on it, with their version tags, before it touches the
installation.
the client was built on (once after each nightly build), it rebuilds
the client from the installed release's
containers/Dockerfile, nowpart of the release. That takes about a minute; otherwise the client
starts at once. A failed pull or rebuild warns and runs the local
image.
macOS, other architectures, and
--build,--tzor--no-cachebuildthe base locally too.
AZKABAN_AUTO_PULL=0keeps the local image. Thedocs state a new rule: the published base keeps what installed
releases' client stages use (
npm,curl, a free UID/GID 1000).How to verify
publish-imagesfrom the Actions tab on this branch. It shouldend green and publish
azkaban-basewithlatest,latest-amd64and
latest-arm64../install.sh claudefrom this branch. ExpectPulling the base image git.unitoo.it/claudiomaradonna/azkaban-base:latest...,then
Building claude image claude-code:latest....podman image inspect --format '{{index .Config.Labels "azkaban.base"}}' claude-code:latestshould print the ID of
localhost/azkaban-base:latest.claude .. It pulls the base and starts without rebuilding.After the next nightly run, the first launch prints
claude: the base changed; rebuilding claude-code:latest.make lint && .agents/hooks/shellcheck.sh repo && make testpasses oneach commit. The rewritten publish, install, launch and Dockerfile tests
fail on
master. Not tried: the workflow on the runner, a real installor launch with Podman, and
make test-e2e.Considerations
The first launch after each nightly base takes about a minute per
client, even when the client itself has not released anything. One low
review finding was set aside: an assertion label in
tests/unit/test_containerfile.shstill says "timezone argument" for aclient, where the build now passes the timezone only to the base.