Repository navigation
Commit dd6c66a
fix: run the container runtime as the host user (#7)
TestCreateToRunDocker failed on Linux CI (but not macOS) on its second
Init: the dependency cache hashes code/uv.lock and got "permission denied".
Root cause: the container ran as root, so `uv sync` wrote uv.lock into the
bind-mounted source (and populated the venv) as root. On a host where the
invoking user isn't root — Linux CI — the next Init could no longer read the
root-owned uv.lock to hash it. Docker Desktop's UID remapping masked this on
macOS.
Run the container as the invoking host user (uid:gid) so everything it writes
into bind mounts is host-owned. uv's download cache defaults to $HOME/.cache,
which that user can't write inside the image, so mount a dedicated host-owned
cache dir and point UV_CACHE_DIR at it.
Also assert init.Status is READY in the create-to-run test: Init reports
failures through the response status, not the returned error, so the previous
require.NoError let a failed Init through and surfaced as a confusing
empty-network-mappings error later.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent cd9da84 commit dd6c66a
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
129 | 136 | | |
130 | 137 | | |
131 | 138 | | |
| |||
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
150 | 165 | | |
151 | 166 | | |
152 | 167 | | |
| |||
0 commit comments