Skip to content

Conversation

@blkt
Copy link
Contributor

@blkt blkt commented Oct 28, 2025

Docker networking works differently depending on whether it's running inside a VM or on the (linux) host itself, with VM-based installations like Docker Desktop not supporting host network. What happens is that the port is exposed on the VM rather than the actual host. Note that this is the case for linux running Docker Desktop.

On the other hand, Docker Engine installations work just fine on linux, but we were still configuring the Proxy to try to connect to the wrong port.

This is PR assumes that

  • all linux installations run docker engine
  • all non-linux installations run on VMs

Fixes #2317

@blkt blkt self-assigned this Oct 28, 2025
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.90%. Comparing base (720b794) to head (0624596).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pkg/transport/http.go 0.00% 6 Missing ⚠️
pkg/container/docker/client.go 50.00% 2 Missing and 2 partials ⚠️
pkg/container/docker/client_final_port_linux.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2353      +/-   ##
==========================================
- Coverage   54.26%   53.90%   -0.37%     
==========================================
  Files         242      250       +8     
  Lines       23446    23977     +531     
==========================================
+ Hits        12724    12924     +200     
- Misses       9514     9829     +315     
- Partials     1208     1224      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blkt blkt force-pushed the hack/fix-mcp-port-host-network-linux branch from 4aac9f7 to 508b2b3 Compare October 29, 2025 14:46
@blkt blkt marked this pull request as ready for review October 29, 2025 14:47
Docker networking works differently depending on whether it's running
inside a VM or on the (linux) host itself, with VM-based installations
like Docker Desktop not supporting `host` network. What happens is
that the port is exposed on the VM rather than the actual host. Note
that this is the case for linux running Docker Desktop.

On the other hand, Docker Engine installations work just fine on
linux, but we were still configuring the Proxy to try to connect to
the wrong port.

This is PR assumes that
* all linux installations run docker engine
* all non-linux installations run on VMs

Fixes #2317
@blkt blkt force-pushed the hack/fix-mcp-port-host-network-linux branch from 508b2b3 to 0624596 Compare October 29, 2025 14:48
Copy link
Contributor

@therealnb therealnb left a comment

Choose a reason for hiding this comment

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

l 🐦 🐦 ks good to me

@blkt blkt merged commit a3199a6 into main Oct 29, 2025
29 checks passed
@blkt blkt deleted the hack/fix-mcp-port-host-network-linux branch October 29, 2025 15:07
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.

Host networking lies about the MCP url

5 participants