Docker, Mac M1 and Unable to Access Initial Configuration

I’m in the midst of migrating from esxi docker to mac desktop docker, and I’m unable to get an initial install “fully completed” - in other words, certain ports are being locked up I believe by the mac or by the install.

This is what I’m using to install the container:

docker run --init -d --name="home-assistant" -e "TZ=America/New_York" -v /Users/USERNAME/Documents/homeassist:/config --net=host --restart=always homeassistant/home-assistant:stable

With the --net=host, I’m not able to access the container. But, if I specify -p 8123:8123, the program runs, but it’s not locating certain integrations, such as Lifx Bulbs, which run on port 56700.

I’m trying to solve for the --net=host config versus specifying multiple ports.

Any ideas what I’m missing here? The config files are being stored on the mac documents area and not in the container (reading/writing is working fine there). Is this a permissions issue with docker desktop to open up a port with the mac. I’m running experimental version for the M1 for docker desktop, so not sure if this is the issue.

Also, what’s the best way to migrate everything over from the esxi environment over to this new environment? I’m a bit stuck on what to do there - it can’t be something as simple as just copying/pasting over the entire config files/etc into the new config folder. What about setting up integrations, etc.?

Thank you.

The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.

(Don‘t know, if that is applicable to Apple M1)

Thank you Christoph, so best approach is to open up multiple ports or a range of ports to allow full functionality? Appreciate your quick response. This was driving me crazy…

I’ve been looking at running various things on an M1 Mini, but support is relatively low at the moment. I have Plex running no problem.

I run my supervised HA instance at the moment on Ubuntu on virtual box on a 2013 Mini, which is fine, but of course HA would rather I run it on Debian.

I’ve installed Debian via the Parallels tech preview (since virtual box may or may not get an M1 version, and VM Fusion doesn’t have a version yet for M1), and then installed supervised HA on top of that. It seems to run fine, though haven’t tested usb pass through yet for my zwave controller, and of course I can’t be sure that all the addons I use will have an ARM64 version. But I’m sure it will come in time.

I don’t plan to switch over from the old Mini yet, until there is formal VM support and I can see all the addons are supported.

Thank you Roger. Running it in Docker Desktop just doesn’t appear possible and not sure what HA will do or if this is a docker desktop issue. I’m going to keep running HA in an esxi VM on my old workhorse server for the time being.

Good to see another Plex user as it’s really impressive for running the app natively using the M1 and Rosetta. I’m running Sonarr and Radarr in Docker Desktop also and those are working perfectly.

I’m loath to run HA straight in Docker desktop, because I use a fair amount of addons, and to be honest I’m happy having supervisor manage them, rather than having to install them all by hand in docker.

I tried getting Portainer to install, on the Debian instance, but it wouldn’t because it doesn’t recognise the ARM64 chip I think. I came across this somewhere else where it will install an ARM64 container when it sees an aarch machine type, but not when it sees an ARM64 machine type. This will get sorted in time I’m sure.

One of the reasons for getting the M1 was to improve my Plex performance. The old 2013 mini struggled with downsizing photos for transmission, and we use it a lot as a photo store (probably about 100k photos). It is like night and day in performance.

I would guess you are using the tech preview of Docker on M1. I guess that maybe an issue, but it maybe the HA isn’t recognising you machine type when it try’s to start up.

HA is starting up just fine in Docker. The problem is that “–net=host” command when creating the container won’t function where it will allow scanning of ports and installation of various integrations, e.g., LIFX Bulbs. I guess I could solve it by specifying all ports, -p 1:99000, but that’s not a good process to open that container up like that to all ports.

I’d also like to transition over the esxi install, but that just blows up with an SFTP transfer (with hidden files) into the newly created config location on my M1.

I’ll give it another try in next few months.