Commit 7285b32
Make /etc/hosts write non-fatal for non-root container execution
gh-aw PR #26658 adds --user $(id -u):$(id -g) to the MCP gateway
Docker run command so log files are readable by downstream steps.
With set -e, the echo >> /etc/hosts in configure_host_dns() would
abort the gateway when running as non-root.
Fix: wrap the write in an if-else so failure is a warning, not fatal.
With --network host the host.docker.internal mapping is unnecessary
anyway since localhost works directly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 410d054 commit 7285b32
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
290 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
291 | 293 | | |
292 | 294 | | |
293 | 295 | | |
| |||
0 commit comments