-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Docker Desktop: Host Networking on macOS and Windows. #570
Comments
Let me test this out, then will update the documentation. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed as no further activity has occurred. |
Noticed this issue has been re-opened. When will it be fixed? Recently I was having trouble adding HomeBridge to HomeKit. |
So I took some time today to look at this closer on my Intel Mac mini, running macOS Monterey. And while I was able to make some progress, was not able to get homebridge to work. For the setup, I first enabled host networking in the Docker Desktop I then used the current docker-compose.yml file for docker-home bridge, and was able to start homebridge. And was able to access the UI via the url http://docker-desktop.local:8581 I was able to install a couple of plugins without issue, and things appeared to work from the Homebridge UI side of things. But I was unable to pair Homebridge with the home app on my phone. And looking deeper, the issue is how Docker handle's local ip addresses on MacOS versus linux. On linux the docker container uses the same IP address as the host, while on MacOS it uses its own IP address on a different network. My host / primary network is 192.168.1.x, and not what you see here. What was interesting, was that I could access the homebridge instances and the UI remotely by using the host computers IP address and the proper port number from inside the container. To get homebridge to work, we would likely need to fool the mDNS Advertiser to think it is working from the host interface, and use its IP address in the advertisements. |
Current Situation
The wiki states here that Windows and macOS are not supported as they lack the
--net=host
parameter. This is no longer the case in Docker Desktop 4.34.0. Homebridge does indeed start and appears to function as expected with one minor issue, the detected IP addresses are that of the docker container itself, and not the host.Proposed Change
Allow a configuration variable to force Homebridge to advertise itself on a given IP address even if it's not bound to it, this should allow HomeKit to find the Homeridge instance.
Additional Context
Docker Desktop documentation: https://docs.docker.com/engine/network/drivers/host/#docker-desktop
The text was updated successfully, but these errors were encountered: