Skip to content

feat(driver-docker): use host networking for sandboxes - #1080

Merged
drew merged 3 commits into
mainfrom
feat/docker-driver-network
May 1, 2026
Merged

feat(driver-docker): use host networking for sandboxes#1080
drew merged 3 commits into
mainfrom
feat/docker-driver-network

Conversation

@drew

@drewdrew commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Split out the Docker-driver networking changes from #1069. This PR keeps the gateway as a host process and runs Docker sandbox supervisor containers with Docker host networking so they can reach a gateway bound to 127.0.0.1 without adding an extra bridge-reachable listener, proxy, or host /etc/hosts change on Linux.

Related Issue

Split from #1069.

Changes

  • Run Docker sandbox containers with network_mode = "host" so supervisor callbacks can use loopback gateway endpoints directly.
  • Preserve OPENSHELL_ENDPOINT exactly as configured for both plaintext and TLS gateway endpoints.
  • Add a container-local host.openshell.internal -> 127.0.0.1 hosts entry for a stable OpenShell-owned alias to host loopback services.
  • Remove the Docker dedicated-bridge network configuration, endpoint rewriting, and extra gateway listener path that were part of the earlier iteration.
  • Keep agent workload networking enforced by the supervisor's nested network namespace and policy proxy.
  • Update Docker driver architecture docs and the architecture index to describe the host-networking behavior.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Additional checks run:

  • cargo test -p openshell-driver-docker
  • cargo fmt --all -- --check
  • markdownlint-cli2 architecture/docker-driver.md architecture/README.md
  • git diff --check

Known local test blocker:

  • mise run pre-commit gets through format, lint, markdown, Helm, Python, Rust check, and Clippy, then fails in sandbox_create_keeps_sandbox_with_forwarding because Docker Desktop PID 50455 is already listening on local port 8080.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@drew
drew requested a review from a team as a code ownerApril 30, 2026 16:33
@drewdrew mentioned this pull request Apr 30, 2026
15 tasks

@cgwalterscgwalters left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just looking at the arch doc so far

Comment threadarchitecture/docker-driver.md Outdated
Comment threadarchitecture/docker-driver.md Outdated
@drew
drew marked this pull request as draft April 30, 2026 18:05
@copy-pr-bot

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@drew
drewforce-pushed the feat/docker-driver-network branch from 28a8c31 to 0aee0f9CompareMay 1, 2026 08:47
@copy-pr-bot

Copy link
Copy Markdown

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.

@drewdrew changed the title feat(driver-docker): isolate sandboxes on dedicated bridgefeat(driver-docker): use host networking for sandboxesMay 1, 2026
@drew
drew marked this pull request as ready for review May 1, 2026 14:56
@drew
drew merged commit fcefdd5 into mainMay 1, 2026
14 checks passed
@drew
drew deleted the feat/docker-driver-network branch May 1, 2026 15:09
Sign up for freeto 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.

3 participants

@drew@cgwalters@TaylorMutch