feat: pull the published image on launch #55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/auto-pull"
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
The client images are now republished nightly for Linux amd64 and arm64
(#53, #54), but a host only picks them up when someone reruns
./install.sh. Until thenclaude,codexandopencodekeep runningthe clients from the day of the install. The launcher could keep them
current by itself.
Two alternatives were set aside. Checking at most once a day would need
a state file per client. Stopping the launch when a pull fails would
block offline work. A marker written by the installer, to protect local
builds automatically, would add state and tie the installer to the
launcher; instead, a setting turns the pull off.
What changed
On Linux x86_64 and aarch64, a launch on the default image now pulls
git.unitoo.it/claudiomaradonna/<image>:latestand tags it with thelocal name before it starts. A workspace
Dockerfile.<client>orDockerfile.azkabanthen builds on the fresh image during the samelaunch. Nothing is pulled:
--imageorAZKABAN_IMAGE;--dry-run, which prints# would pull ...instead.If the pull or the tag fails, the launch warns and runs the local image.
It stops only when there is no local image.
AZKABAN_AUTO_PULL=0in an identity'senv, or in itsenv.<client>,turns the pull off. Any value other than
0or1stops the launch.The image is shared by every identity, so keeping an image built with
--build,--tzor--no-cachemeans setting the control in eachidentity that launches the client. After such a build on a host that
pulls, the installer prints a reminder.
The registry address now lives only in
clients/registry.sh, which theinstaller and the launcher both read. Updating
azkabanitself stilltakes
./install.sh.How to verify
branch, then run
claude .. Standard error showsclaude: pulling git.unitoo.it/claudiomaradonna/claude-code:latestand Podman's output, then the client starts. On
masterno pullhappens.
AZKABAN_AUTO_PULL=0to~/.azkaban/identities/default/envandlaunch again: no pull line appears.
AZKABAN_AUTO_PULL=falsestopsthe launch with
AZKABAN_AUTO_PULL must be 0 or 1.claude: WARNING: updating claude-code:latest from ... failed; running the local imageand starts.
make lint && .agents/hooks/shellcheck.sh repo && make testpasses onthe tip. The new
tests/integration/test_auto_pull.shtests, theAUTO_PULLcontrol check, and the installer reminder fail onmaster.The first commit pins that launches on other machines and on macOS do
not pull. Not tried: a real pull with rootless Podman, and
make test-e2e.Considerations
Each launch now adds a registry round trip, about a second when the
image is already current. Every launch also replaces the image with
whatever was last pushed, with no signature or digest check. The trust
is the same as for an install, but now it applies on every launch.
Each new image leaves the previous one untagged; the README points to
podman image pruneand topodman rmifor installed version tags.