0
Docker without Desktop on macOS

This post was inspired by this Medium post. It’s a couple years old and doesn’t cover Compose.

Docker Desktop is a bit of a bloated mess and I’ve had more than my fair share of issues with it — on both Windows and macOS. When I sat down to setup my new work Macbook, I decided I wanted to rid myself of Desktop.

Prerequisites

Docker Installation

The installation is fairly easy and straight forward. Start by installing Docker, its credential helper to use macOS’s Keychain to store remote registry credentials, and Colima for the container runtime.

brew install docker docker-credential-helper colima

After the install completes, you can start Colima with:

colima start

And that’s it. You’re up and running with Docker.

By default, Colima doesn’t start at login so you’d need to use the above command each time you wanted to run Docker containers. You can start it automatically with Homebrew Services:

brew services start colima

Docker Compose Installation

If you use Docker Compose, there’s some additional setup that needs to happen.

brew install docker-compose

For docker to recognize the plugin, you’ll need to update ~/.docker/config.json to look in the Homebrew directory. It should look something like this:

{
	"auths": {},
	"credsStore": "osxkeychain",
	"currentContext": "colima",
	"cliPluginsExtraDirs": [
		"/opt/homebrew/lib/docker/cli-plugins"
	]
}

No comments yet.
Leave a comment

Your email address will not be published. Required fields are marked *