Repository navigation
Commit 8be45dc
fix(docker): run every server image as its non-root user
The fetch, git and time images created an app user and chowned the
virtualenv to it but never switched to it, and the filesystem, memory and
sequentialthinking images never used the node user their base image ships,
so all six ran their server as root.
Each now ends on USER app or USER node. The Python images install the
uv-managed interpreter under /python instead of /root/.local, which the app
user cannot read, and give app a home directory. The git image trusts every
mounted repository (safe.directory '*'), since a bind mount is rarely owned
by app. The memory image gives /app/dist, where its default graph lives, to
node. The READMEs cover the gitconfig path, --user on Linux hosts, and the
one-time chown of a memory volume an older image created.
Closes modelcontextprotocol#4741
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>1 parent e80aac9 commit 8be45dc
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
| 33 | + | |
29 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
30 | 39 | | |
31 | | - | |
| 40 | + | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
| 44 | + | |
| 45 | + | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
| |||
0 commit comments