Skip to content

Conversation

@Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Dec 23, 2025

Summary

  • Enable host.docker.internal DNS name in the agent container for cross-platform container-to-host communication
  • Add extra_hosts: ['host.docker.internal:host-gateway'] to Docker Compose configuration
  • Useful for connecting to MCP servers running on the host machine from inside the firewall

Background

host.docker.internal is a special DNS name that resolves to the host machine's IP address from inside a container:

Platform Native Support
Docker Desktop (macOS/Windows) Built-in
Linux Requires explicit extra_hosts config

Previously, users on Linux had to use the gateway IP (172.30.0.1) directly. With this change, both approaches work:

  • http://host.docker.internal:8080/mcp/gh-aw
  • http://172.30.0.1:8080/mcp/gh-aw

Changes

  • src/docker-manager.ts: Add extra_hosts to agent service config
  • src/types.ts: Add extra_hosts property to DockerService interface
  • src/docker-manager.test.ts: Add test for extra_hosts configuration

Test plan

  • Unit tests pass (npm test -- --testPathPattern="docker-manager")
  • Manual test: Run a server on host, connect from inside awf using host.docker.internal

🤖 Generated with Claude Code

Enable `host.docker.internal` DNS name in the agent container by adding
`extra_hosts: ['host.docker.internal:host-gateway']` to the Docker Compose
configuration.

This provides a cross-platform way to connect from inside the firewall to
services running on the host machine, which is particularly useful for
MCP servers running on the host.

- Add extra_hosts configuration to agent service in docker-manager.ts
- Add extra_hosts property to DockerService type in types.ts
- Add test to verify extra_hosts configuration is generated correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions
Copy link

💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...]

@github-actions
Copy link

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link

Test Coverage Report

Metric Coverage Covered/Total
Lines 81.02% 1230/1518
Statements 80.98% 1261/1557
Functions 78.16% 136/174
Branches 72.56% 410/565
Coverage Thresholds

The project has the following coverage thresholds configured:

  • Lines: 38%
  • Statements: 38%
  • Functions: 35%
  • Branches: 30%

Coverage report generated by `npm run test:coverage`

@github-actions
Copy link

Smoke Test Results (run #20469760133)

Last 2 merged PRs:

Test Results:

  • ✅ GitHub MCP Testing
  • ✅ File Writing Testing
  • ✅ Bash Tool Testing

Status: PASS

📰 BREAKING: Report filed by Smoke Copilot fer issue #168 🗺️

@github-actions
Copy link

Smoke Test Results (Claude)

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP
  • ✅ File Writing
  • ✅ Bash Tool
  • ❌ Playwright MCP (tunnel connection failed)

Status: FAIL (Playwright unable to load page resources)

💥 [THE END] — Illustrated by Smoke Claude fer issue #168 🗺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants