Docker on macOS without Docker Desktop

After the recent announcement from Docker that Docker Desktop for Mac won’t be free anymore, I tried to find an alternative to run my Docker containers.

These are the raw instructions to get it running with Multipass:

# Install multipass
brew install multipass
multipass launch -v --cpus 8 --mem 8G --disk 80G --name docker
multipass exec docker -- bash

# Update system
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install build-essential -y

# Fix DNS
Edit /etc/systemd/resolved.conf
systemctl restart systemd-resolved

# Install docker
sudo systemctl edit docker.service
curl -sSL | sh
sudo usermod -aG docker $USER

# Configure Docker
sudo systemctl edit docker.service
	ExecStart=/usr/bin/dockerd -H fd:// -H tcp://
sudo systemctl daemon-reload
sudo systemctl restart docker.service

# Install client on OSX
# (Outside multipass)

# Configure it to always use -H
Get the ip from `multipass info docker`
Add export DOCKER_HOST= to your ~.bashrc or equivalent

# Test it
docker run hello-world

In the next few days I’ll update this post with a better guide, including screenshots and troubleshooting options.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s