Repository navigation
fix(docker): give the agent executor a passwd entry - #708
Closed
jedrzejsieracki wants to merge 1 commit into
Closed
jedrzejsieracki wants to merge 1 commit into
jedrzejsieracki wants to merge 1 commit into
Conversation
Agent processes and stdio MCP servers run as uid 10001 since the privilege drop, but the image had no passwd or group entry for it. Programs that look their own user up refuse to start without one: an ssh-based stdio MCP server failed with "No user exists for uid 10001" and ARTEX reported only "mcp: connection closed". Create artex-exec (10001:10001, the default -exec-uid/-exec-gid) with the server's executor home and no login shell, before the binary is copied in so the cached layers above stay valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Landed in main through #722 (merge What merged is your panel change: the panel image now creates One difference from the patch: Closing as merged. The credit stays with you in the 0.7.1 notes. |
1119738829
pushed a commit
to 1119738829/ARTEX
that referenced
this pull request
Nov 30, 2026
…nel and worker images Port BaaRai#708 into the panel Dockerfile and Dockerfile.worker so uid/gid 10001 resolves to artex-exec in both images (fixing tools such as ssh that require a passwd entry for the running UID) and add the 0.7.1 CHANGELOG entry. Co-authored-by: BaaRai <130491490+BaaRai@users.noreply.github.com>
1119738829
pushed a commit
to 1119738829/ARTEX
that referenced
this pull request
Nov 30, 2026
Dockerfile.worker already creates exec (10001:10001) with HOME=/home/exec; BaaRai#708's artex-exec rename was unnecessary and would have changed the worker identity name. The panel image keeps the artex-exec entry it needed; the worker is unchanged. The changelog now says so.
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
An ssh-based stdio MCP server fails in the Docker image with only
mcp: connection closed, for example:Run by hand as the MCP server runs,
sshexits with 255 before it connects:Since 04a7ab3 (the agent privilege drop), stdio MCP servers run as the executor uid 10001 (
server/mcpdiscover.go), but the image has no passwd or group entry for it. OpenSSH looks up the user it runs as and refuses to start without an entry. Any program that does the same lookup fails the same way.The same configuration still works in a container built before the privilege drop, because there everything runs as root, which made this confusing to track down.
Change
The runtime stage creates
artex-execwith uid/gid 10001 (the default-exec-uid/-exec-gid):/app/data/exec-home, the executor home the server prepares;/usr/sbin/nologinas the shell;It sits right before the binary is copied in, so the cached layers above it stay valid.
The CHANGELOG entry notes two things operators may trip over:
-exec-uidneeds its own entry.Testing
On a deployment running this change, with an MCP server like the one above:
getent passwd 10001givesartex-exec:x:10001:10001::/app/data/exec-home:/usr/sbin/nologin.sshrun as uid 10001 (docker compose exec -u 10001:10001 artex ssh ...) gets past the user lookup. With the key made readable to uid 10001, it authenticates and the server exits 0.[isolation] self-test passedis still logged and[mcp] <name> discovered 14 tools and cached them. Before the change the log saidstartup auto-discovery of <name> failed: mcp: connection closed.There is no Go change, so the Go tests are unaffected.
🤖 Generated with Claude Code