Repository navigation
fix(docker): honour MCPPROXY_LISTEN in the server image (#1942) - #1948
Conversation
The ENTRYPOINT hardcoded `--listen 0.0.0.0:8080`, and a flag outranks MCPPROXY_LISTEN, so `-e MCPPROXY_LISTEN=...` was a silent no-op. Move the container default into `ENV MCPPROXY_LISTEN=0.0.0.0:8080` and make the ENTRYPOINT `mcpproxy serve`. Default stays 0.0.0.0:8080; `--listen` passed as container args still wins over the variable. The PR docker-image job now runs scripts/test-docker-listen.sh against the built image: default answers on 8080, MCPPROXY_LISTEN moves the listener off 8080, --listen beats MCPPROXY_LISTEN. Docs: installation, deploying-for-a-team, environment-variables; drop the inert leading "serve" from the K8s args and compose command examples. Fixes #1942 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying mcpproxy-docs with
|
| Latest commit: |
574ecf4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ece2ee5a.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://codex-1942-container-listen.mcpproxy-docs.pages.dev |
|
Independent runtime check passed on all three cases with the candidate Linux server binary in real containers. Default listened on 8080, MCPPROXY_LISTEN moved it to 9090, and an explicit --listen moved it to 7070. The superseded ports stopped answering. I used a scratch base with the PR’s ENV and ENTRYPOINT, and remapped the host-side test ports because 18080 was occupied. The full multi-stage image remains covered by PR CI. |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 44719577416 --repo smart-mcp-proxy/mcpproxy-go
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Release-coordination QA:
|
Fixes #1942.
Problem
The server image's
ENTRYPOINT ["mcpproxy","serve","--listen","0.0.0.0:8080"]passed a flag, and--listenoutranksMCPPROXY_LISTEN, sodocker run -e MCPPROXY_LISTEN=...was silently ignored.Change
Dockerfile:ENV MCPPROXY_LISTEN=0.0.0.0:8080+ENTRYPOINT ["mcpproxy","serve"].0.0.0.0:8080.--listen(container args) >MCPPROXY_LISTEN> configlisten> default.-e MCPPROXY_LISTEN=(empty) falls back to the config file (internal/config/loader.goonly applies a non-empty value).docker run IMAGE --config=... --data-dir=...invocations keep working.servedoes not validate positional args, so a stray leadingservein args is still inert.scripts/test-docker-listen.shis a real-container smoke test, wired into the PRdocker-imagejob:/healthzanswers on 8080.-e MCPPROXY_LISTEN=0.0.0.0:9090, it answers on 9090 and not on 8080.--listen 0.0.0.0:7070plus that env, it answers on 7070 and not on 9090."serve"is dropped from the K8sargsand composecommandexamples.Verification
I could not run Docker or
go buildlocally in this session (both needed approval), so the CIBuild Server Docker Imagejob is the real-container check. An independent read-only review traced the precedence againstloader.go/main.goand checked the script. It found no defects.🤖 Generated with Claude Code