Hi folks! I’m a HomeAssistant noob hoping to find some help.
I just installed HA in Docker on a Mac running Sierra. I had to reset Docker a couple times and get the Shared Files stuff worked out, but after that, the installation seemed to complete without a hitch. Configuration.yaml is right where it should be.
But there’s no front end. I’ve tried loading it via localhost:8123, Mac’s-LAN-IP:8123, 127.0.0.1:8123. I’ve tried entering the URLs as both http and https. I’ve tried it in multiple browsers. The Mac’s firewall is turned completely off.
After it failed to load, I went ahead and made a few tweaks to the config and restarted. No joy. Same result.
Generally, each container is given its own IP address. You can make your container use your networks IP address by using the --net=host flag.
You should be able to see what the IP address of your home assistant container is, by running
docker inspect home-assistant
Where host-assistant is the name you set using the --name flag in your original docker run command. If you didn’t set one, you can see what it is (and if your Home Assistant container is running) by using the command docker ps.
Once you have the IP address of your Docker container, you should be able to access it by that IP address, ir 18.104.22.168:8123.
Ah, are you using Docker Machine? I can see in that screenshot there that there’s a sandboxID in the network. Wondering if the network adapter is being sandboxed for some reason.
If you’re using Docker Machine, you might need to do some other trickery to expose the Docker container to your PC. From the Docker Machine Docs
For each machine you create, the Docker host address is the IP address of the Linux VM. This address is assigned by the docker-machine create subcommand. The docker-machine ip <machine-name> command returns a specific host’s IP address.
So I’m thinking you might need to find the IP Address of the Docker Machine, then use that to connect to Home Assistant.
Another possibility would be to use --net=bridge and -p 0.0.0.0:8123:8123 to expose the port.
You should then be able to access the WebUI via http://127.0.0.1:8123/ (or any other ip address bound to this machine).
After some messing around, I think the story here is that on OSX, docker has a shim virtual machine between the OSX host and the docker image, and choosing --net=host actually puts the docker container on the shim’s network, not the OSX network.
I really don’t have any proof, except that firing up a virtualbox image and installing docker on it, and starting the home-assistant container on that image with --net=host let’s me go to the virtualbox image’s address at port 8123, and everything loads as it should.
If anyone wants to do some digging to prove or disprove this theory, that’d probably be for the best.
I’ve given up on Docker for now because of the difficulty with networking. I’ve seen some walk-throughs out there on the issue but they’re far too unwieldy for something that IMHO should be easily configurable. I haven’t tinkered with it at all in a few weeks but IIRC, getting the container so that it’s visible on the network is straightforward, but talking back to it is not. I have to believe the Docker devs will address this at some point.