Architecture compatibilty of Mac Mini M2 as Docker server? reddit / selfhosted ---------------------------------------------------------------------- CincyTriGuy · 2023-12-10 16:24 I’m considering a base model M2 Mac mini as a homelab server which would run Docker containers. I’ve seen people discussing this in previous threads, and processor architecture compatibility always comes up. Am I wrong that any arm-based container image should work on the Mac mini? I have an rPi 4 and my thought was any container which works on the Pi should work on the Mac. ---------------------------------------------------------------------- NinjaFragrant7710 · 2023-12-10 16:56 The M1 processor is based on the ARM architecture so I wouldn't expect any arm64 image to not run on the Mac Mini. I do expect however some images to not support ARM architecture. Having said that, I don't think that this is the right platform for home lab/self host. I would recommend a mini pc. ---------------------------------------------------------------------- ADB-UK · 2023-12-10 17:10 Do not do it. One key component in the networking stack is only implemented on Linux - MACVLANs cannot be set up on Windows of Mac OS. Also not all images are available for ARM boxes yet :-( (I am typing this on a M1 iMac so biased to Macs not against them) ---------------------------------------------------------------------- CincyTriGuy · 2023-12-10 17:10 But is it fair to say that any Docker image which runs on a Raspberry Pi should run on an M1/M2/Mxx? That’s what I’m trying to wrap my head around. ---------------------------------------------------------------------- thekrautboy · 2023-12-10 17:11 If you would already own it, then sure use it. Its definitely not bad in performance and power efficiency. However the ARM platform will limit your options in which software you can run on it. If you havent bought the mini yet, consider buying a used MiniPC from like Lenovo, HP, Dell etc instead. They can be very cheap (~100€) depending on which CPU you go for. Also easy to upgrade RAM and drives, which im certain isnt super simply (or possible at all) with Apple... ---------------------------------------------------------------------- jobe_br · 2023-12-10 19:12 Docker on macOS will run arm64 images natively and x86_64 images through Rosetta so you’ll be fine. As long as you don’t need exotic networking stuff, you shouldn’t see any problems. ---------------------------------------------------------------------- DetectiveDrebin · 2023-12-10 19:13 I did it for a while running docker desktop. I migrated to a couple of intel NUCs with proxmox, and it’s been way more stable. Plus proxmox is a great environment for VMs and LXCs. Give it a try, hopefully things are more stable on the Macs these days. ---------------------------------------------------------------------- CincyTriGuy · 2023-12-10 19:26 Thanks, this is very helpful. I'm currently only using the Docker bridge network on my other hosts and I don't forsee needing anything beyond that. ---------------------------------------------------------------------- CincyTriGuy · 2023-12-10 19:43 Thank you, this is helpful. In my rack I currently have a 7th gen NUC running Debian as a Docker host, and a Raspberry Pi 4 which is also a Docker host. (I also have a rack-mounted 11th gen Windows 11 NUC but it needs to stay as-is and non-virtualized for its use cases). My 7th gen NUC is getting long in the tooth. My Raspberry Pi 4 actually outperforms it (according to Sysbench CPU testing). I'd love to replace it with a Raspberry Pi 5, but availability. As an aside, I also have some Mac-specific use cases that are causing me to think about putting a Mac mini in my rack. So that got me thinking about retiring the 7th gen NUC and moving its containers to this potential new Mac mini. Maybe down the road I'd still get an rPi 5 once availability eases up, but at least this approach would take care of my immediate needs. Perhaps a silly question, but do you interact with Docker Desktop on a Mac the same way you do on Linux? Ie., can I SSH into the Mac and run Docker CLI commands to manage containers using compose files? ---------------------------------------------------------------------- jbutlerdev · 2023-12-10 20:13 Yes ---------------------------------------------------------------------- adamshand · 2023-12-10 21:10 There were significant performance problems with disk IO running Docker on macOS. I don't remember the details, but it was a major PITA loading large PGSQL datasets into a macOS docker container and there wasn't a fix a year ago. ---------------------------------------------------------------------- DetectiveDrebin · 2023-12-11 00:34 I was just getting started on Docker and using the M1, so I spun up Docker Desktop only. Not sure if Docker can solely be ran from the command line, automatically starting at boot/restart, etc. ---------------------------------------------------------------------- rorykoehler · 2023-12-11 12:16 X86 will also run but use lots of resources