Skip to content

docs(container-gateway): fix Docker driver setup for containerized gateway#1419

Merged
TaylorMutch merged 1 commit into
NVIDIA:mainfrom
ericcurtin:docs-container-gateway-docker-driver/ec
Jun 3, 2026
Merged

docs(container-gateway): fix Docker driver setup for containerized gateway#1419
TaylorMutch merged 1 commit into
NVIDIA:mainfrom
ericcurtin:docs-container-gateway-docker-driver/ec

Conversation

@ericcurtin
Copy link
Copy Markdown
Contributor

@ericcurtin ericcurtin commented May 17, 2026

Summary

The container-gateway docs were missing or misstating several requirements for running the gateway as a Docker container with the Docker compute driver. Validated by deploying on a Fedora Kinoite (bootc) system.

Related Issue

N/A — discovered during hands-on deployment on a bootc system.

Changes

  • Add OPENSHELL_GRPC_ENDPOINT to all Docker driver examples; the Docker driver uses only the scheme (http/https) — host and port are substituted automatically with host.openshell.internal and the gateway's own bind port
  • Add supervisor binary extraction step — the binary must exist at the same absolute path on the host filesystem and inside the gateway container, because the host Docker daemon uses that path as a bind-mount source when creating sandbox containers
  • Keep port binding as 127.0.0.1:8080 — the Docker driver automatically binds the gateway to the bridge network interface via gateway_bind_addresses(), so exposing on 0.0.0.0 is unnecessary
  • Add group_add: [docker] to the compose service — the gateway image runs as nvs:nvs (UID 1000) which needs the docker group to access the Docker socket
  • Add remote gateway registration instructions (--remote flag for LAN access)
  • Add --server-san host.openshell.internal to generate-certs in the mTLS section — sandbox containers resolve host.openshell.internal to reach the gateway, so this SAN must be present in the server cert
  • Complete the mTLS docker run with the missing docker driver requirements (--group-add docker, supervisor binary mount, OPENSHELL_GRPC_ENDPOINT, OPENSHELL_DOCKER_SUPERVISOR_BIN)
  • Add deploy/docker/gateway.toml — TOML config for the Docker driver; binds to 127.0.0.1 since the Docker driver adds the bridge listener automatically
  • Add deploy/docker/docker-compose.yml — references gateway.toml as the primary config source; sets command: [] to clear the default CMD; keeps only three env vars that cannot be expressed in TOML
  • Clarify DooD vs DinD in compose comments — no --privileged needed, only socket read/write access
  • Add docs/get-started/tutorials/docker-compose.mdx — end-to-end tutorial for Docker Compose setup

Address reviewer feedback:

  • Move Docker Compose tutorials card to the bottom of the list
  • Replace inline YAML snippet in Docker Compose section with a reference to deploy/docker/ to avoid drift
  • Clarify OPENSHELL_DB_URL is safe in compose.yml (plain SQLite path, no credentials); the TOML block targets credential-bearing DSNs like postgresql://user:pass@host/db
  • Note that ./ in source: resolves relative to the compose file directory, not the caller's CWD
  • Clarify that only the scheme from OPENSHELL_GRPC_ENDPOINT matters
  • Add note that the tilde volume mount resolves to the same absolute path on both host and container sides

Testing

  • mise run pre-commit passes (markdownlint clean; python:proto failure is pre-existing env issue unrelated to this change)
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 17, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment thread docs/about/container-gateway.mdx Outdated
Comment thread docs/about/container-gateway.mdx Outdated
@ericcurtin ericcurtin force-pushed the docs-container-gateway-docker-driver/ec branch 2 times, most recently from c1ff3e7 to 05176ab Compare May 18, 2026 11:42
Comment thread deploy/docker/gateway.toml Outdated
Comment thread deploy/docker/docker-compose.yml Outdated
Comment thread deploy/docker/docker-compose.yml
Comment thread deploy/docker/docker-compose.yml
@ericcurtin ericcurtin force-pushed the docs-container-gateway-docker-driver/ec branch from 05176ab to a8cc6c0 Compare May 19, 2026 10:55
@ericcurtin
Copy link
Copy Markdown
Contributor Author

@drew @elezar PTAL

Comment thread deploy/docker/docker-compose.yml Outdated
@ericcurtin ericcurtin force-pushed the docs-container-gateway-docker-driver/ec branch 2 times, most recently from 0193302 to d25036a Compare May 29, 2026 08:36
@TaylorMutch
Copy link
Copy Markdown
Collaborator

/ok to test d25036a

Comment thread docs/get-started/tutorials/index.mdx Outdated
Copy link
Copy Markdown
Collaborator

@TaylorMutch TaylorMutch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment otherwise LGTM

Comment thread deploy/docker/docker-compose.yml
Comment thread deploy/docker/docker-compose.yml
Comment thread docs/about/container-gateway.mdx
Comment thread docs/about/container-gateway.mdx
Comment thread docs/about/container-gateway.mdx Outdated
@ericcurtin
Copy link
Copy Markdown
Contributor Author

@elezar @TaylorMutch addressed all comments, just as a heads up, I'm heading on PTO, so if we don't get this to completion on this iteration, it's fine, but this will be stagnant for a few weeks

…teway

The existing docs omitted or misstated several requirements when running
the gateway as a container with the Docker compute driver:

- OPENSHELL_GRPC_ENDPOINT is required; the Docker driver uses only the
  scheme (http/https) — host and port are substituted automatically with
  host.openshell.internal and the gateway's own bind port
- Supervisor binary must be extracted to a host path before starting the
  gateway; bind-mount sources are resolved by the host Docker daemon so
  the path must be identical inside and outside the gateway container
- Docker socket access requires adding the docker group (UID 1000 default)
- Port binding should remain 127.0.0.1; Docker driver adds a bridge
  listener automatically
- add --server-san host.openshell.internal to generate-certs for mTLS
- Complete the mTLS docker run with all Docker driver requirements
- Add deploy/docker/gateway.toml — TOML config for the Docker driver
- Add deploy/docker/docker-compose.yml referencing the TOML
- Add docs/get-started/tutorials/docker-compose.mdx tutorial page
- Remote gateway registration instructions (--remote flag)

Address reviewer feedback:
- Move Docker Compose tutorials card to the bottom of the list
- Replace inline YAML snippet in Docker Compose section with a reference
  to deploy/docker/ to avoid drift
- Clarify OPENSHELL_DB_URL is safe in compose.yml (plain SQLite path,
  no credentials); the TOML block targets credential-bearing DSNs
- Note that ./ in source: resolves relative to the compose file directory
- Clarify that only the scheme from OPENSHELL_GRPC_ENDPOINT matters
- Add note that the tilde volume mount resolves to the same absolute
  path on both host and container
@ericcurtin ericcurtin force-pushed the docs-container-gateway-docker-driver/ec branch from d25036a to 2953e1c Compare June 3, 2026 16:28
@TaylorMutch
Copy link
Copy Markdown
Collaborator

/ok to test 2953e1c

@TaylorMutch TaylorMutch merged commit 1c8417c into NVIDIA:main Jun 3, 2026
28 checks passed
@ericcurtin ericcurtin deleted the docs-container-gateway-docker-driver/ec branch June 3, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants