Skip to content

Instantly share code, notes, and snippets.

@slykar
Last active December 1, 2024 08:25
Show Gist options
  • Save slykar/e92732be9bf81a71e08068245656d70e to your computer and use it in GitHub Desktop.
Save slykar/e92732be9bf81a71e08068245656d70e to your computer and use it in GitHub Desktop.
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
@OldDream
Copy link

OldDream commented Jul 25, 2024

hey guys, with OpenCore-Legacy-Patche, VirtualBox 6.1.x can take another breath on sonoma(14.5 tested), just work as usual. I just upgraded from Monterey without any issue. image

wow!So docker can work?

@Leomin07
Copy link

@brorbw
Addressing localhost from a VirtualBox virtual machine

@brorbw
Copy link

brorbw commented Jul 25, 2024

@Leomin07 I'm going to need a bit more context for that comment.

@Leomin07
Copy link

@brorbw how to reach application running in minikube at 'localhost' on docker-compose? thank bro.

@evenlee
Copy link

evenlee commented Jul 26, 2024

hey guys, with OpenCore-Legacy-Patche, VirtualBox 6.1.x can take another breath on sonoma(14.5 tested), just work as usual. I just upgraded from Monterey without any issue. image

wow!So docker can work?

I didn't use docker machine for a while as it is a bit aged, minkube works fine.

@wenerikk
Copy link

wenerikk commented Dec 1, 2024

@brorbw, can you pls advice on this error:
unable to get image 'postgres:14.5-alpine': Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

commands with docker works (like docker run hello-world) but any call to docker-compose bumps to this error (have installed docker-compose).

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