-
Notifications
You must be signed in to change notification settings - Fork 46
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
Can this tool help me connect port when docker run use --net="host" #8
Comments
Hi @631068264, I assume you are trying to use Currently this package does not solve that, although I can think of some options to make that happen (ie. monitor In the mean time, you can replace Docker Desktop with Rancher Desktop (using |
Thanks for your reply. I just wanted to find a solution or a tool help me, when use I'm not good at these(docker network on OSX, etc) so I'm sorry that I can' tell you sth more valuable. I even don't know how to connect the Linux VM on OSX. |
Thanks for clarifying. If you are not tied to the official Docker Desktop, I would give something like Rancher Desktop a try as it supports what you are trying to do. I'll keep this feature in mind for this package though and let you know if it's gets added in the future. |
BTW a very nice feature to have, I have tried to map the docker container somehow to my local machine 127.0.0.1, but don't have success with that. |
This is exactly what I am looking for as well - if there is a way to do this it would be great. I am specifically running into the issue where the discoverable IoTs are on the host network and home assistant cannot auto discover devices and some devices do not report back due to lack of host networking in docker desktop for mac. |
@alexandertsukanov @dro-ex Thanks for the comments. @dro-ex That's a neat use case - unfortunately I don't think this tool will solve your problem. Assuming Home Assistant uses mDNS to discover devices, mDNS packets can't traverse layer 3 network boundaries, at least not without an mDNS reflector. I haven't been able to find any macOS-based mDNS reflectors yet unfortunately. FWIW, Rancher Desktop creates a layer 2 bridged network between macOS and the container VM (compared to a layer 3 network on Docker Desktop), which means protocols like mDNS are supported. This means that all you need to do is attach your container to a I just tried this using $ docker run --net=host hsfeng/avahi-browse --all
... |
Unless I am overlooking something (amd I am sure I am), the above is not working with home assistant:
I am still getting "no devices on network" |
@dro-ex I've never used Home Assistant before, but just gave it a quick try here. For me no devices were discovered at first, but then I realized that the default network interface picked by Home Assistant for discovery was wrong under Settings > System > Network. For me the correct interface for my LAN was Let me know if that helps. |
It's very strange - I am not getting any network settings in home assistant using Rancher Desktop - just a blank page - no errors. It is working but no -net=hose access. I've tried both nerdctl and docker as engines. I am going to try some different things and see if I can the network settings to show up. |
@dro-ex I had to set my profile to "Advanced Mode" to see the Network Settings. See: Was also getting a blank screen without that enabled. |
Thank you! It is indeed discovering local IoT devices - this is such good news. Thank you! I am now trying to learn what I need to to ditch portainer and docker desktop and recreate all the containers in rancher. Thank you again! |
No description provided.
The text was updated successfully, but these errors were encountered: