Repository navigation
fix: skip port check for remote Docker hosts - #8128
Conversation
When using a remote Docker context (e.g., via SSH tunnel), IsPortActive() attempts TCP dial to the remote IP with 0ms timeout, which always times out and produces false "Unable to properly check port status" warnings. This patch detects when the Docker IP is a non-local address and skips the port availability check entirely, returning false (port not active).
There was a problem hiding this comment.
Thank you @svicervlad !
When using a remote Docker context (e.g., via SSH tunnel)
Could you please add an example or documentation on how to set this up in the first post (not asking to update our docs)?
I can look it up myself, but it’s better to get the info firsthand.
Co-authored-by: Stanislav Zhuk <[email protected]>
|
Download the artifacts for this pull request:
See Testing a PR. |
|
Use case: Remote Docker on VPS for energy-efficient development MacBook Air M1 8GB — locally only Setup:
Problem: cc @stasadev |
|
@svicervlad I haven't tested this situation for ages (docs from last time are at https://docs.ddev.com/en/stable/users/topics/remote-docker/ ) but I'd be interested if you'd mention why this was valuable for you and what your situation is. |
|
We'd love to have you write a ddev.com blog post about your situation and your usage, people would find it super interesting. https://github.com/ddev/ddev.com has all the info, and https://ddev.com/blog/contributing-to-ddev-com has more in-depth. Thanks for the contribution! |
rfay
left a comment
There was a problem hiding this comment.
It's great, thanks! Resurrected my EC2 remote docker for testing. Re-learned a lot. Additional PR coming.
|
There's more to getting this going than described in the setup here, especially because of the problems with 10999 and other details covered in But I was able to reproduce the horrible wait for each port connection timeout (on macOS) |
Experimental revert. For odd reasons we now have persistent hangs on macOS. This reverts commit d16e244.
Summary
IsPortActive()attempts TCP dial to the remote IP with 0ms timeout, which always times outfalse(port not active)Problem
Users running DDEV with a remote Docker context (e.g.,
docker context use remote-server) get repeated timeout warnings:The v1.25.0 security-software bypass (#7921) doesn't cover this case because it only triggers when all ephemeral ports appear active.
Solution
In
IsPortActive(), check if the Docker IP is a non-local address. If so, skip the TCP dial entirely and returnfalse. This is safe because:Test plan
ddev startworks without warnings on remote Docker context