Run Docker-OSX on Apple Silicon #162

Open
opened 2025-12-29 00:18:52 +01:00 by adam · 6 comments
Owner

Originally created by @yousifa on GitHub (Apr 6, 2021).

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.

Originally created by @yousifa on GitHub (Apr 6, 2021). 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.`
Author
Owner

@hareesh309 commented on GitHub (Apr 6, 2021):

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 commented on GitHub (Apr 6, 2021): 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 `
Author
Owner

@ghost commented on GitHub (Apr 6, 2021):

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.

@ghost commented on GitHub (Apr 6, 2021): 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.
Author
Owner

@sickcodes commented on GitHub (Apr 7, 2021):

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 commented on GitHub (Apr 7, 2021): You can remove the KVM argument, and accelerate either over TCG or no acceleration, I don't have an M1 to test on currently
Author
Owner

@DerZyklop commented on GitHub (Feb 10, 2022):

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 commented on GitHub (Feb 10, 2022): 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 ```
Author
Owner

@liadmord commented on GitHub (Mar 2, 2022):

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 commented on GitHub (Mar 2, 2022): 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?
Author
Owner

@ylluminate commented on GitHub (Jun 23, 2023):

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

@ylluminate commented on GitHub (Jun 23, 2023): https://github.com/sickcodes/Docker-OSX/issues/547
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#162