fix(docker): let local gateway discover supervisor endpoint

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
This commit is contained in:
Drew Newberry
2026-10-04 22:14:05 -07:00
parent 16bad48d7e
commit 9e2288bb8a
3 changed files with 9 additions and 4 deletions
@@ -966,6 +966,8 @@ uses `host.docker.internal` on Desktop or with a wildcard listener, otherwise
the Linux listener's non-loopback address. Both use the gateway's bind port.
Bridge requires a reachable listener; OpenShell does not widen it. Set an
explicit endpoint for remapped ports. HTTPS certificates must cover the endpoint.
The local `gateway:docker` task uses automatic endpoint selection unless you set
`OPENSHELL_GRPC_ENDPOINT`.
Bridge resolves both host aliases through Docker's `host-gateway`; native Linux
services bound only to loopback remain unreachable. Desktop host mode requires
+3 -1
View File
@@ -301,7 +301,9 @@ Common findings:
feature is enabled. Bridge mode uses `host.docker.internal` for the Desktop
host and requires a bridge-reachable listener on native Linux. Explicit
`grpc_endpoint` values must be reachable in the selected mode, including any
remapped published port, with matching TLS certificate names. Mode selection
remapped published port, with matching TLS certificate names. The local
`gateway:docker` task discovers its endpoint unless `OPENSHELL_GRPC_ENDPOINT`
supplies an override. Mode selection
does not bypass Landlock/seccomp qualification. A gateway container under ECI
also needs an administrator-approved Docker socket exception. See the
published [Docker configuration](https://docs.nvidia.com/openshell/latest/how-it-works/gateways/configuration.md)
+4 -3
View File
@@ -146,8 +146,6 @@ ensure_docker_runtime_image \
sandbox \
"sandbox runtime"
GRPC_ENDPOINT="${OPENSHELL_GRPC_ENDPOINT:-http://127.0.0.1:${PORT}}"
CARGO_BUILD_JOBS_ARG=()
if [[ -n "${CARGO_BUILD_JOBS:-}" ]]; then
CARGO_BUILD_JOBS_ARG=(-j "${CARGO_BUILD_JOBS}")
@@ -191,12 +189,15 @@ supervisor_image = "${SUPERVISOR_IMAGE}"
sandbox_runtime_image = "${SANDBOX_RUNTIME_IMAGE}"
image_pull_policy = "${SANDBOX_IMAGE_PULL_POLICY}"
sandbox_label = "${SANDBOX_NAMESPACE}"
grpc_endpoint = "${GRPC_ENDPOINT}"
# Explicit supervisor-compatible default. Set RuntimeDefault or
# Localhost/<profile> only on a Docker host with AppArmor enabled.
app_armor_profile = "Unconfined"
EOF
if [[ -n "${OPENSHELL_GRPC_ENDPOINT:-}" ]]; then
printf 'grpc_endpoint = "%s"\n' "$(toml_escape "${OPENSHELL_GRPC_ENDPOINT}")" >>"${CONFIG_PATH}"
fi
# Keep the local task's proxy inputs aligned with [openshell.drivers.docker].
# Credentials stay in the referenced root-owned file; do not echo their value.
if [[ -n "${OPENSHELL_SANDBOX_HTTPS_PROXY+x}" ]]; then