Skip to content

Instantly share code, notes, and snippets.

@malteos
Created May 28, 2024 11:03
Show Gist options
  • Save malteos/7b3e5b4a64408c1d4d216ba756b9b995 to your computer and use it in GitHub Desktop.
Save malteos/7b3e5b4a64408c1d4d216ba756b9b995 to your computer and use it in GitHub Desktop.
Run Docker (without Docker Desktop) on MacOS with Apple Silicon (M1/M2/...)

Run Docker (without Docker Desktop) on MacOS with Apple Silicon (M1/M2/...)

Docker Desktop requires an expensive license for commercial use: https://www.docker.com/pricing/faq/

# Install minikube
brew install minikube

# Install Docker CLI
brew install docker
brew install docker-compose


#  hyperkit is not available for mac m1/m2. ARM chips.
brew install qemu

minikube start --driver=qemu

# Tell Docker CLI to talk to minikube's VM
eval $(minikube docker-env)

# Save IP to a hostname
echo "`minikube ip` docker.local" | sudo tee -a /etc/hosts > /dev/null

# Test
docker run hello-world

Sources

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