I have an M2 Mac Mini. I am trying to get Home Assistant to run in Docker from my Mac Mini. Currently, I have the following Dockerfile:
Dockerfile
# Start the home assistant base image
FROM homeassistant/home-assistant
# Open a port to
EXPOSE 3001
I then run docker build --tag home-assistant .. This approach successfully creates an image named “home-assistant”. When I attempt to run the image, I’m prompted to enter a port number, so I choose “0”. I’m told the container successfully starts. However, when I visit the url provided in Docker Desktop, I just see a web page that says: “This page isn’t working”
Thank your for your question. From my understanding, you can’t run Home Assistant image directly within Docker on Apple Silicon. Instead, you have to install a Linux image. Then, install the Home Assistant container on that image. Seems to defeat the purpose of Docker. However, I’m not a Docker expert. I just know enough to be dangerous.
Plus, I wanted to create one file such that I can just include things like a) port numbers via environment variables, b) a volume, and c) name the container. I’m not a Docker expert. I know enough to be dangerous with it. I thought this would be a good way to learn these things with the opportunity to learn about Home Assistant.
If you actually have to do that, that’s not what your dockerfile do. It just basically takes a default HA image (idk which architecture) and re-tag it.
And I guess you have to install HA Core on that linux image, not HA container, which indeed doesn’t make any sense.