Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: support connecting to docker desktop containers on windows #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bliles
Copy link

@bliles bliles commented Aug 15, 2024

It's possible that a change like this would be better off as a fork or even a separate repo, which I'm willing to do, but I wanted to see first if you would be interested in upstreaming the work. It could mean that the project would become something like Docker Desktop Net Connect.

I've tested the Windows support and the biggest limitation is that the user needs to start the executable as a privileged service (I've just been using psexec for testing). Simply launching the executable from an elevated shell is insufficient for starting the tunnel.

@gregnr
Copy link
Member

gregnr commented Aug 15, 2024

Hey @bliles, great work! Definitely open to upstreaming this 🚀

Edit: looks like the Docker Windows docs have been updated to be more clear - direct IP addressing is only available on Windows containers. So definitely will need WireGuard here!

Give me a bit of time to review this PR 👍


Original:

Just so that I'm clear, can you confirm that Windows does not expose any kind of bridge network already for containers? We've briefly looked at supporting Windows in the past but decided against it at the time because the Docker docs seemed to mention a bridge network already existing: #9

Tbh, even if a bridge network does already exist on Windows, we still need to update the routing table so worth adding that at a minimum (or the full WireGuard tunnel to be consistent)

@bliles
Copy link
Author

bliles commented Aug 15, 2024

Thanks so much for taking a look at my work, feedback appreciated!

Windows does have a bridge network for the containers, but this network is limited to the docker VM:
https://docs.docker.com/desktop/networking/#i-cannot-ping-my-containers. The docs further state that the bridge network is not reachable from the host (unless you are using Windows containers).

The solution generally mentioned for Docker on Windows is the same as Mac, mapping ports from the host to the container.

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.

2 participants