Image toolchain for agents in Rex terminals #5
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
mikluko/kuberex#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Map: #1
Question
What joins the
machine-reximage (baox,bao,git,gh,kubectl,aws,forgejo-mcpwiring), from which sources, and is packaging shared with the progressor agent image? The answer is the Dockerfile change list.Context for this ticket, from mikluko/baox:
.debpackages for amd64 and arm64 in thesarak.shDebian registry (distributiontrixie, componentmain), so it installs from apt likerexandclaude-code. Asarak.sh/mikluko/baoximage also exists.BAO_TOKEN, thenopenbao.token_file, thenopenbao.kubernetes(the pod's projected ServiceAccount token,mount/roleconfigurable). In this pod that means thekubernetesblock with rolerex-side naming from the OpenBao ticket.$BAOX_CONFIGor~/.config/baox/config.yaml; unknown keys are errors. Open: bake it into the image (BAOX_CONFIG=/etc/baox/config.yaml) or keep it in the home on/srv/rex.gh/fjviarun, the kubectl ExecCredential, AWScredential_process, and theheadersHelperforforgejo-mcp.baox tokenfeeds thebaoCLI.Q1 (base) decided: the image no longer builds on
machine-debian(arm64-only; its systemd and unbound parts never run underdumb-init). It goesFROM debian:trixie-YYYYMMDD, multi-arch, with the needed packages inlined. The repo is renamedmikluko/kuberex, the image becomessarak.sh/mikluko/kuberex. Still open here: tool sources, baox config location, credential-helper wiring, Claude Code defaults, sharing with progressor.Decided so far in this ticket:
apt-get installthrough overlayfs whose upper dirs sit on a shared emptyDir; the main container mounts the same overlays and drops torex. Proven or refuted in #10.hostUsers: falseand namespacedCAP_SYS_ADMINreplace "all capabilities dropped".Answer
Base.
FROM debian:trixie-YYYYMMDD, independent ofmachine-debian, multi-arch (amd64 + arm64). Imagesarak.sh/mikluko/kuberex.Baked toolchain.
git,golang,nodejs,npm,build-essential,openssh-client,ca-certificates,libpam0gbaoxsarak.shapt registry (trixie,main)ghkubectlpkgs.k8s.ioapt repoawsawscliif v2, else AWS's installer, pinnedbao,fjInstalled at startup. Rex and Claude Code, through a real
apt-get installin the init container over overlayfs with upper dirs on a shared emptyDir; the main container mounts the same overlays and drops torex. Mechanism proven or refuted in #10.REX_VERSION,CLAUDE_CODE_VERSION, each defaulting to the newest.REX_APT_AUTH(default/etc/rex-apt/auth.conf); onsaraksh, Secretrex-aptfrom an ExternalSecret on OpenBaokv/k8s/agents/rex-apt. No build secret.hostUsers: false, namespacedCAP_SYS_ADMIN.Wiring, baked system-wide.
baoxconfig at/etc/baox/config.yaml,BAOX_CONFIGset./etc/gitconfigcredential helpers (GitHub, Forgejo);KUBECONFIG=/etc/kube/configwith thebaox kubeexec user;AWS_CONFIG_FILEwithcredential_process./usr/local/bin/claudewrapper:baox run --env-file /etc/baox/claude.env -- /usr/bin/claude "$@",CLAUDE_CODE_OAUTH_TOKENfromagents/anthropic/agent-rex./etc/claude-code/managed-settings.json:permissions.defaultMode: bypassPermissions;forgejo-mcpwithheadersHelper: baox forgejo header sarak.Not shared with the progressor agent image.
Correction to the answer:
baocomes from OpenBao's apt repository, not a pinned binary.fjis not in the image.Correction: no
claudewrapper and noCLAUDE_CODE_OAUTH_TOKENfrom OpenBao. Claude Code is logged in interactively in a Rex terminal; credentials persist in the home on/srv/rex.