Skip to content

Instantly share code, notes, and snippets.

@slykar
Last active September 21, 2023 17:10
Star You must be signed in to star a gist
Embed
What would you like to do?
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine

# Normally, those links are created automatically by running Docker.app,
# but it quits on us too early, so we need to do this manually
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-compose" /usr/local/bin/docker-compose
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-credential-desktop" /usr/local/bin/docker-credential-desktop
ln -s "/Applications/Docker.app/Contents//Resources/bin/docker-credential-osxkeychain" /usr/local/bin/docker-credential-osxkeychain

You can also use brew to install docker and doccker-compose and it should work without linking above.

Running

docker-machine create
eval $(docker-machine env)
docker run hello-world
docker-compose up
@namchuai
Copy link

namchuai commented Feb 26, 2023

Thanks for all the pointers. Here's what I had to do, as unfortunately in Ventura 13.1, VirtualBox 6.1.40 kexts do not load, which means no luck when creating a host-only network adapter.

In order to fix this, you need to edit your config.plist file and disable kext signing from SIP as indicated at https://caizhiyuan.gitee.io/opencore-install-guide/troubleshooting/extended/post-issues.html#disabling-sip.

After doing so, proceed to reinstall VirtualBox 6.1.40, kexts will now load at startup and should enable minikube to create the host-only network adapter.

This works for me. Tested with Ventura 13.2.1 (22D68). Virtual Box 6.1.40. Disabled SIP.
Screenshot 2023-02-26 at 15 33 14

@dheerajv4855
Copy link

dheerajv4855 commented Feb 27, 2023

Dinghy is working for me on my ryzentosh without any issue
https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

@alexoxte
Copy link

Dinghy is working for me on my ryzentosh without any issue https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

I tried it, but always return an error, when run the command to create an vm.

@brorbw
Copy link

brorbw commented Feb 28, 2023

@dheerajv4855 you can also use the official https://github.com/docker/machine for that

@dheerajv4855
Copy link

Dinghy is working for me on my ryzentosh without any issue https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

I tried it, but always return an error, when run the command to create an vm.

Hi,
can you share what error you are getting ?

@alexoxte
Copy link

alexoxte commented Mar 2, 2023

Dinghy is working for me on my ryzentosh without any issue https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

I tried it, but always return an error, when run the command to create an vm.

Hi, can you share what error you are getting ?

image
The solucion is
image
But that option is not showing up. I use Mac Os Ventura

@dheerajv4855
Copy link

Dinghy is working for me on my ryzentosh without any issue https://jetstudy.net/docker/install-docker-in-amd-hackintosh-ryzentosh-system/

I tried it, but always return an error, when run the command to create an vm.

Hi, can you share what error you are getting ?

image The solucion is image But that option is not showing up. I use Mac Os Ventura

you should allow virtualbox from security at time of installation
make sure you are using version 6.1.26
Uninstall and install again virtualbox and see if that works

@dheerajv4855
Copy link

one thing i would like to mention is SIP is disabled in my system
@namchuai has also a working virtualbox in ventura with SIP disabled
maybe that could be a reason

@evenlee
Copy link

evenlee commented Apr 7, 2023

@mam

This works for me. Tested with Ventura 13.2.1 (22D68). Virtual Box 6.1.40. Disabled SIP. Screenshot 2023-02-26 at 15 33 14
@namchuai , were you enable to create an vm and start it with no errors?

@namchuai
Copy link

namchuai commented Apr 7, 2023

@evenlee yes, I can

@evenlee
Copy link

evenlee commented Apr 8, 2023

@evenlee yes, I can

Thanks for confirming, it's wired I cannot run any vm even minikube vm by start button in VM window, but I can use 'minikube start' to start the minikube vm. my value to disable sip is 6F020000(I also tried many values, same result, but this one seems perfect), and i am just upgraded to 13.3 from 12.6.
image

@namchuai
Copy link

namchuai commented Apr 8, 2023

@evenlee sorry, I misunderstood your question. I tried with windows VM but got same error as your.

Edit: I can use Genymotion (which is a VM for Android) normally.

@evenlee
Copy link

evenlee commented Apr 9, 2023

@evenlee sorry, I misunderstood your question. I tried with windows VM but got same error as your.

Edit: I can use Genymotion (which is a VM for Android) normally.

Thanks, it seems i have to stay on Monterey for now, maybe I will upgrade my build to 13900 when I got time to rebuild :).

@brorbw
Copy link

brorbw commented Apr 17, 2023

Let me add that you can now use

brew tap homebrew/cask-versions
brew install --cask virtualbox6

To install the correct version of Virtualbox

@phtmgt
Copy link

phtmgt commented Jul 19, 2023

Thanks for the guide. It works here (ryzentosh Ventura). However, there's an issue with VirtualBox 6.1.40 - it uses double the amount of RAM (e.g., if you allocate 4.0 GB, you can check Activity Monitor where you'll see ~8.0 GB used). The issue is documented here - https://www.virtualbox.org/ticket/19726

Not a deal breaker, but might be problematic for some. An older version - 6.1.2 r135662 - does not have the double memory issue, I am not sure, if it will work in this case. If someone tries it, please share feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment