feat: publish client images and pull them on install #53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/published-images"
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
Every install or update of azkaban builds each client image locally from
containers/Dockerfile: apt, Node.js, gh, fj and the client itself, onevery machine, at every client release. Now that a Forgejo runner is
available, the forge can build the images once and hosts can pull them.
Pulling with an automatic fallback to a build was set aside because it
hides registry failures; multi-arch images were set aside because the
runner is amd64 and QEMU emulation is slow.
What changed
A new
publish-imagesworkflow runs nightly, on pushes tomasterthatchange the Dockerfile, the client registry, the publish script, or the
workflow, and on demand. It builds every registered client for
linux/amd64 on the runner's Docker-in-Docker daemon and pushes
git.unitoo.it/claudiomaradonna/<image>:latestand:<client version>,only after every image has built.
On a linux/amd64 host,
./install.shnow pulls those images and givesthem the same local names as before (
codex-cli:latest, and solocalhost/codex-cli:latestforDockerfile.azkabanand custom images),so the launcher and custom images are unchanged.
--buildkeeps thelocal build,
--tzand--no-cacheimply it, and macOS and non-amd64Linux hosts build as before. A failed pull leaves the installation as it
was. The README, the development guide and the client guide describe
the new behavior and the publishing setup.
Before the first run, the repository needs the secret
REGISTRY_TOKEN:an access token of
claudiomaradonnawith thewrite:packagescope.The repository and its packages must stay public.
How to verify
REGISTRY_TOKENset, runpublish-imagesfrom the Actions tabon this branch. It should end green and show
codex-cli,claude-codeandopencode-cliunder the owner's packages, each withlatestand a version tag../install.sh claudefrom this branch. The output should show
Pulling claude image git.unitoo.it/claudiomaradonna/claude-code:latest...with no build, and
podman imagesshould listlocalhost/claude-code:latest. Onmasterthe same command buildsthe image.
./install.sh --tz Europe/Rome claudebuilds locally, as before.make lint && .agents/hooks/shellcheck.sh repo && make testpasses onthe tip. The new
tests/unit/test_publish.sh,tests/integration/test_install_pulls.shand the--buildhelp checkfail on
master. Not tried: the workflow on the real runner, which needsthe secret, and
make test-e2e, which needs real rootless Podman.Considerations
Hosts now trust whatever was last pushed to the registry: there is no
digest pin or signature check, so a
write:packagetoken for theaccount controls what every amd64 install runs. This assumes the
runner's dind daemon is not shared with untrusted jobs, which could
retag an image between build and push.
The push triggers also include the publish script and the workflow
file, beyond the Dockerfile and registry that were agreed, since they
too change the published images. One low review finding was set
aside: the
--tz/--no-cachepin was folded into the feature commitrather than committed first.