Docker.app will complain about incompatible processor, so we will use Docker Machine.
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-osxkeychainYou can also use brew to install docker and doccker-compose and it should work without linking above.
docker-machine create
eval $(docker-machine env)
docker run hello-world
docker-compose up
If you are on modern macOS on an AMD Hackintosh, VirtualBox and old Docker Machine setups are essentially obsolete and very painful to maintain.
There is a much cleaner, modern solution that uses Colima + QEMU (TCG multi-threaded software emulation), which completely bypasses Apple's Hypervisor.framework and Virtualization.framework (
vz):π Original project: https://github.com/osx86-ijb/docker-amd-hackintosh
Note if you run into installation / reboot issues with the original script:
The upstream script currently has a minor bug where
colima deletewipes the config file right before booting, causing it to fall back tovz(VZErrorDomain Code=2: Virtualization is not available on this hardware), as well as autostart issues withbrew services.If you hit this, you can check out my fork where these issues are already resolved:
π Fork with fixes: https://github.com/romaztek/docker-amd-hackintosh
Tested and confirmed working on:
Key fixes included in the fork:
colima.yamlis no longer wiped before start, and explicit--vm-type qemu --cpu-type qemu64flags are passed to prevent anyvzfallback.com.colima.autostart.plist):brew services start colimafails on AMD because Homebrew's plist uses a hardcoded systemPATHwithout~/bin(running unpatched QEMU). The fork includes a dedicated LaunchAgent that loads the wrapper and auto-starts Docker on login.colima start --kubernetes), which is vastly faster and lighter than Minikube in DinD.Both Docker and Kubernetes run smoothly on AMD Hackintosh this way!