Installing Docker on MacOS Headless

April 02, 2026

I recently encountered a new project that interested me. The project was setup with docker, but did not use any of the normal docker tools. Instead, it relies on git to download the files, a Dockerfile for build, and a docker-compose.yml file that handles build and deploy. This meant that I needed to clone the git repo, and then run an install script.

This is a terrible way to distribute a docker container, and I hope they address this soon.

This meant I needed to install docker on my Mac Mini host, using the command line, with no options to interact with the host's screen.

Thankfully, this Mac Mini had already been setup with the xcode-commandline-tools, and brew.

How to Install Docker on Mac OS, without a Screen

There used to be a project called docker-machine that would let you run Docker purely from the command line. That project has been deprecated, so I did not feel that it would be a good option to start with.

You can also install the brew --cask docker, which is the Desktop version of Docker, but managed by brew. That would be the method that I am most familiar with, but Docker Desktop requires interaction...on the desktop.

What I found instead is to use the following:

# Install Docker, Docker-compose, and the docker build tools.
brew install docker buildx docker-compose 
# Start Colima.
colima start
# Check that docker is working.
docker ps

You may not need Compose, or the Buildx tools, but I did for this project. Ignore them if you don't need them.

Running colima start lets Colima download and configure a lightweight container in which to run docker. It then is able to link this container runtime into the PATH of your command line session, allowing docker ps to commerce to its containerized version of /var/run/docker.sock.

For more information about Colima check out their GitHub Page.

This was all I needed to do. No services to run, no authentication things to click through, and most importantly no security pop-ups that could only be cleared from a Desktop session.


Profile picture

Written by Grant Brinkman, husband and father. Coffee, tech, photography, book, film and outdoors enthusiast.

© 2026 All Rights Reserved, Built with Gatsby