BuildWithMatija
  1. Home
  2. Blog
  3. Docker
  4. Install Docker CLI on Mac with Colima — Fast Guide 2026

Install Docker CLI on Mac with Colima — Fast Guide 2026

Move from Docker Desktop to Colima: lightweight CLI-only Docker with Compose, Buildx, and Homebrew setup

5th January 2026·Updated on:21st October 2026·MŽMatija Žiberna·
Docker
Install Docker CLI on Mac with Colima — Fast Guide 2026

🐳 Docker & DevOps Implementation Guides

Complete Docker guides with optimization techniques, deployment strategies, and automation prompts to streamline your containerization workflow.

No spam. Unsubscribe anytime.

Related Posts:

  • •Docker Compose env file: .env vs env_file vs environment
  • •Docker Volume is in Use Error? 4 Proven Solutions
  • •Update Docker to Latest Version on Ubuntu
  • •How to Configure Development Containers with Docker
  • •Vite Docker: Production Deployment with Nginx, SSL, and Compose
📄View markdown version
0

Frequently Asked Questions

Comments

About the author

Matija Žiberna

Matija Žiberna

Full-stack developer, co-founder

AboutResume

Self-taught full-stack developer sharing lessons from building software and startups.

I'm Matija Žiberna, a self-taught full-stack developer and co-founder passionate about building products, writing clean code, and figuring out how to turn ideas into businesses. I write about web development with Next.js, lessons from entrepreneurship, and the journey of learning by doing. My goal is to provide value through code—whether it's through tools, content, or real-world software.

You might be interested in

Docker Compose env file: .env vs env_file vs environment
Docker Compose env file: .env vs env_file vs environment

13th May 2025

Docker Volume is in Use Error? 4 Proven Solutions
Docker Volume is in Use Error? 4 Proven Solutions

13th May 2025

Update Docker to Latest Version on Ubuntu
Update Docker to Latest Version on Ubuntu

16th August 2025

How to Configure Development Containers with Docker
How to Configure Development Containers with Docker

18th August 2025

Vite Docker: Production Deployment with Nginx, SSL, and Compose
Vite Docker: Production Deployment with Nginx, SSL, and Compose

19th August 2025

Contents

  • **1. Why Docker Desktop Often Fails or Is Unsuitable**
  • **2. Use Colima for a CLI-Only Docker Environment**
  • **3. Install Required Tools**
  • **Step 1: Install Homebrew (if not installed)**
  • **Step 2: Install Colima**
  • **Step 3: Install Docker CLI and Compose**
  • **Step 4: Start Colima**
  • **4. Handling Credential Helper Issues**
  • **5. Running Docker Compose Projects**
  • **Tip:** Alias for convenience
  • **6. Cleaning Up Disk Space**
  • **7. Summary of Steps**
  • **8. Why This Setup Is Better**
  • **8. What to Read Next**
On this page:
  • **1. Why Docker Desktop Often Fails or Is Unsuitable**
  • **2. Use Colima for a CLI-Only Docker Environment**
  • **3. Install Required Tools**
  • **4. Handling Credential Helper Issues**
  • **5. Running Docker Compose Projects**
Build with Matija logo

Build with Matija

Senior-led B2B websites, applications, content systems, and digital infrastructure. Business-first, full-stack, AI-assisted, no handoffs.

Services

  • B2B Website Development
  • CMS Architecture Review & Platform Blueprint
  • Next.js + Payload Advisory
  • AI Integration & Implementation

Resources

  • CMS Hub
  • B2B Website Strategy
  • E-commerce Hub
  • Blog
  • Case Studies
  • About Matija

Payload CMS

  • Payload CMS Developer
  • Payload CMS Migration
  • Payload CMS Demos
  • All Payload CMS Resources

Discuss your project

Planning a rebuild, migration, application, workflow change, or platform decision? Start with the business problem and the system behind it.

Book a discovery callContact me →
© 2026Build with Matija•All rights reserved•Privacy Policy•Terms of Service
BuildWithMatija
Get In Touch

1. Why Docker Desktop Often Fails or Is Unsuitable

Docker Desktop on macOS is a GUI application that bundles:

  • Docker daemon
  • Docker CLI
  • Docker Compose
  • Credential helpers
  • GUI system tray and settings

Issues we encountered:

  • Homebrew installation repeatedly failed because of a conflicting binary (/usr/local/bin/hub-tool) pointing to a missing /Applications/Docker.app.
  • Docker Desktop requires a large macOS GUI app that some developers may not want.
  • GUI apps consume more system resources and don’t integrate well in a pure CLI workflow.
  • CLI-only workflows with Docker Desktop require workarounds for credential helpers and build tools.

Conclusion: For pure command-line workflows, a lightweight Linux VM running Docker/Containerd is better.


2. Use Colima for a CLI-Only Docker Environment

Colima creates a lightweight Linux VM on macOS and runs a Docker-compatible runtime inside. It fully supports the Docker CLI and Compose.

Benefits:

  • CLI-only, no GUI
  • Small disk and memory footprint
  • Fully compatible with docker and docker-compose
  • Works with Apple Silicon and Intel Macs

3. Install Required Tools

Step 1: Install Homebrew (if not installed)

bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2: Install Colima

bash
brew install colima

Step 3: Install Docker CLI and Compose

bash
brew install docker docker-compose docker-buildx
  • docker → CLI
  • docker-compose → standalone Compose
  • docker-buildx → build plugin for advanced builds

Note: Do not try to install Docker Desktop via Homebrew cask — it will fail if previous binaries exist or /Applications/Docker.app is missing.


Step 4: Start Colima

bash
colima start
  • Colima creates a Linux VM and runs a Docker daemon inside.
  • After starting, you can use Docker CLI commands normally.

Check that the CLI can reach the daemon:

bash
colima status
docker version
docker run --rm hello-world

If docker version prints a Server section and hello-world runs, you're done. If it says it cannot connect to the Docker daemon, Colima isn't running. Run colima start and try again. When you want to stop everything (for example, to free RAM), use colima stop.


4. Handling Credential Helper Issues

In CLI-only mode, the macOS credential helper (docker-credential-osxkeychain) is not available. To fix:

  1. Edit Docker config:
bash
nano ~/.docker/config.json
  1. Remove or comment out:
json
"credsStore": "osxkeychain"
  1. Save the file. Docker CLI will now pull/push images without the credential helper.

5. Running Docker Compose Projects

Assuming you have a Compose file (e.g., compose.dev.yml) in your project:

bash
docker-compose -f compose.dev.yml up -d
  • -f compose.dev.yml points to your Compose file
  • up -d runs containers in detached mode

Check running containers:

bash
docker-compose ps

Follow logs:

bash
docker-compose logs -f

Stop containers:

bash
docker-compose down

Tip: Alias for convenience

To unify commands with the modern CLI:

bash
alias docker-compose='docker compose'

Then you can run your usual docker-compose commands and they will invoke the CLI-compatible version automatically.


6. Cleaning Up Disk Space

Stopped containers, old images, volumes, and build cache can fill your disk. Recommended commands:

  • Remove stopped containers:
bash
docker container prune -f
  • Remove unused images:
bash
docker image prune -a -f
  • Remove volumes:
bash
docker volume prune -f
  • Remove build cache:
bash
docker builder prune -a -f
  • One-shot cleanup:
bash
docker system prune -a --volumes -f

7. Summary of Steps

  1. Remove broken Docker Desktop remnants.
  2. Install Colima via Homebrew.
  3. Install Docker CLI, Compose, and Buildx.
  4. Start Colima (colima start) to create a Linux VM with Docker daemon.
  5. Fix docker-credential-osxkeychain issue by editing ~/.docker/config.json.
  6. Use docker-compose -f compose.dev.yml up -d to run projects.
  7. Clean up old containers, images, volumes, and build cache as needed.

8. Why This Setup Is Better

  • Works entirely in the terminal.
  • Lightweight and faster than Docker Desktop.
  • No GUI app conflicts.
  • Fully supports Docker CLI, Compose, Buildx, and Colima VM networking.
  • Easier to automate for scripts, CI/CD, and development workflows.

8. What to Read Next

Once docker works on your Mac, these are the natural next steps:

  • Run your project with Compose: Docker Compose env_file vs environment explains which variable source wins, which is the first thing that bites you after docker-compose up.
  • Develop inside containers: How to Configure Development Containers with Docker sets up VS Code Dev Containers with hot reload. It assumes Docker Desktop, but the same docker CLI works against Colima.
  • Fix stuck volumes: If cleanup from section 6 fails, Docker Volume is in Use Error? 4 Proven Solutions walks through it.
  • Ship it: Vite Docker: Production Deployment with Nginx, SSL, and Compose takes a containerized app to a VPS, and Update Docker to Latest Version on Ubuntu covers keeping the server side current.

Comments