Docker-OSX icon indicating copy to clipboard operation
Docker-OSX copied to clipboard

Run Docker-OSX on Apple Silicon

Open yousifa opened this issue 3 years ago • 6 comments

Has anyone been able to get this running on an M1 mac? I know the main point here is to get it running on linux machines, but I'm trying to run OSX on an M1 mac and pass through M1 performance to use certain apple frameworks w/ kubernetes.

W/docker I get the following error WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested docker: Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory.

yousifa avatar Apr 06 '21 02:04 yousifa

I too facing the similar kind of issue.. How to go ahead with this?

Status: Downloaded newer image for sickcodes/docker-osx:big-sur docker: Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory. ERRO[0095] error waiting for container: context canceled

hareesh309 avatar Apr 06 '21 07:04 hareesh309

Short answer your best bet is just use Parallels and run a traditional MacOSX VM in there.

Another thing is you may not need to virtualise mac os, you already have it, even x86 apps should be able to run directly using Rosetta2

AFAIK, docker-osx relies on KVM(Kernel-based Virtual Machine), which is only available on Linux, on Mac devices you can run Parallels which said to have support for M1. Your other option is to virtualise Linux, then run docker-osx there, but that would require nested virtualisation, which M1 might not support. I think another way would be to install Linux directly on the Mac, but not sure if that would work either.

esnosy avatar Apr 06 '21 09:04 esnosy

You can remove the KVM argument, and accelerate either over TCG or no acceleration, I don't have an M1 to test on currently

sickcodes avatar Apr 07 '21 17:04 sickcodes

It gives me the same errors like the M1/arm version, (for which I don’t know the reason yet) but the warning

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

disappears when I run it like this

docker run --platform linux/amd64 sickcodes/docker-osx:latest

DerZyklop avatar Feb 10 '22 12:02 DerZyklop

Using --platform linux/amd64 works as a workaround but the best solution would be to build all the images to arm and upload them, is there any plan to do this?

liadmord avatar Mar 02 '22 15:03 liadmord

https://github.com/sickcodes/Docker-OSX/issues/547

ylluminate avatar Jun 23 '23 18:06 ylluminate