fix(docker): keep the admin api and postgres on loopback; only the gateway binds the bridge - #486
Open
erichanwang wants to merge 1 commit into
Open
fix(docker): keep the admin api and postgres on loopback; only the gateway binds the bridge#486erichanwang wants to merge 1 commit into
erichanwang wants to merge 1 commit into
Conversation
…y binds the bridge
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.
closes #268
on bare-metal linux,
detect_bind_hostpicks the docker0 bridge ip andONECLI_BIND_HOSTfeeds all three published ports — gateway (:10255), admin api (:10254) and postgres (:5432). the same setting that lets agent containers reach the gateway also publishes the admin api and the database on the docker bridge, where unrelated containers can read every agent token and secret metadata.changes:
127.0.0.1by default, reachable only from the hostONECLI_BIND_HOST(the bridge ip on bare-metal linux), so agent containers still workONECLI_APP_BIND_HOST(dashboard/remote access) andONECLI_POSTGRES_BIND_HOST(psql)APP_URLfollows the app bind so the advertised url matches what's actually listening; install.sh prints the correct dashboard url and documents the splitverification:
docker compose configwithONECLI_BIND_HOST=172.17.0.1resolves: 10254 -> 127.0.0.1, 10255 -> 172.17.0.1, 5432 -> 127.0.0.1bash -n scripts/install.shpassesbehavior note: operators who previously reached the dashboard via the lan/bridge ip need to set
ONECLI_APP_BIND_HOSTnow — that's the exposure this closes. related: #228 (rootless containers can't reach the gateway on loopback) is a separate concern on the gateway side, untouched here.