Docker on Mac install: Front end nowhere to be found

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.

Thoughts?

How is your network setup for this container?

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 172.0.0.1:8123.

Hope that helps

Big thanks for the response, Phil. Here’s the run command:

`docker run -d --name="home-assistant" -v /Applications/home-assistant-config:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant`

And here’s the network settings portion of ‘docker inspect home-assistant’ results:

When I removed the --net=host flag, the process assigned an IP of 172.17.0.2, but that wouldn’t load, either.

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).

Sebastian

Not Docker Machine, Phil. Looks like sebk’s suggestion did the trick. I’m up and running.

Huge thanks, guys! Now I need to get alarmdotcom and zwave working, and I should be cooking with gas!

According to the discovery documentation, a docker container needs to be on the host network in order for the uPnP device discovery to work.

So we’re sort of back to the original question: how can we get a docker container, running on the host network, to serve up the UI on port 8123?

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.

docker --net=host does not work on windows or mac and annoyingly it does not show a warning or error: