Repository navigation
Conversation
The Go runtime image (the golang-adk and controller images) runs as uid 65532, which has no /etc/passwd entry, so HOME is / and owned by root. The bash tool's commands inherit that HOME, and any tool that writes a per-user file fails: git config --global, and CLIs that create $HOME/.config on start, such as glab: mkdir /.config: permission denied The image now gives uid 65532 a passwd entry (user and group kagent) with /home/kagent as its home, created and owned by it, and sets HOME=/home/kagent, so a runtime that does not derive HOME from passwd gets it too. The uid, gid, working directory and entrypoint are unchanged. Signed-off-by: Timo Derstappen <teemow@gmail.com>
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Go runtime image (
go/Dockerfile, used for thegolang-adkand controller images) runs as uid 65532, which has no/etc/passwdentry. ItsHOMEis therefore/, owned by root. The bash tool's commands inherit the runtime'sHOME, so every tool an agent runs that writes a per-user file fails:git config --global, and CLIs that create$HOME/.configon start. The GitLab CLI is one; it creates its config directory on every command,--versionincluded.Reproduction against the current image:
With
glabadded to the image, every command fails the same way:Change
go/Dockerfile, final stage:kagent(gid 65532), with/home/kagentas its home, created byadduserand owned by the user.ENV HOME=/home/kagent, so a runtime that does not deriveHOMEfrom passwd (a Substrate actor takes its environment from the image'sENVand the template, not from passwd) hands the same home to the runtime and its commands.The uid and gid, the working directory, the entrypoint and the existing directories (
/skills,/plugins,/data) are unchanged. The controller image built from the same Dockerfile gets the same home, which it does not use.Verification
The final stage's new steps on
alpine:3.24, run as65532:65532:Written by an agent.