Colima + Docker CLI Setup Guide (macOS)
This article introduces how to set up Colima + Docker CLI on macOS.
When using Docker on macOS, many people use Docker Desktop. However, due to the Docker Desktop license change in 2021, companies with more than 250 employees or annual revenue exceeding $10 million now require a paid subscription.
This is where Colima comes in. With Colima, you can use Docker CLI without Docker Desktop.
Colima is a lightweight container runtime for macOS (and Linux). The name stands for Container on Lima, and it’s built on Lima (Linux virtual machines).
Install Colima using Homebrew.
brew install colimaIf you uninstalled Docker Desktop, Docker CLI may have been removed as well. Install Docker CLI separately.
brew install dockerIf you want to use Docker Compose, install it as well.
brew install docker-composeOnce installation is complete, start Colima.
colima startThe first startup takes some time as it downloads the virtual machine image.
Once startup is complete, you can use Docker CLI.
docker psIf this runs without errors, setup is complete. Let’s verify by running the hello-world image.
docker run hello-worldIf you see the “Hello from Docker!” message, everything is working correctly.
# Start
colima start
# Stop
colima stop
# Restart
colima restart
# Check status
colima statusBy default, Colima starts with 2 CPUs, 2GB memory, and 100GB disk. To change resources, specify options at startup.
# Start with 4 CPU cores, 8GB memory, 200GB disk
colima start --cpu 4 --memory 8 --disk 200To change resources of an existing Colima instance, you need to delete and recreate it.
colima delete
colima start --cpu 4 --memory 8 --disk 200To run x86_64 images on Apple Silicon Mac, you can use Rosetta 2 emulation.
colima start --arch x86_64Alternatively, start with the default aarch64 and use Docker’s --platform option.
docker run --platform linux/amd64 your-imageDocker Compose works without any issues.
# In the directory containing docker-compose.yml
docker compose up -dColima supports multiple profiles, allowing you to switch environments based on your needs.
# Create development environment
colima start --profile dev --cpu 4 --memory 8
# Create test environment
colima start --profile test --cpu 2 --memory 4
# List profiles
colima list
# Stop a specific profile
colima stop --profile devYou can mount macOS directories to Docker containers.
docker run -v ~/projects:/app alpine ls /appTo customize mount settings, edit the Colima configuration file.
colima start --editCheck if Colima is running.
colima statusIf it’s not running, start it with colima start.
To expand Colima’s disk size, you need to delete and recreate it.
colima delete
colima start --disk 200If you’re using multiple Docker environments (e.g., Docker Desktop and Colima), verify that the context is set correctly.
docker context ls
docker context use colima| Feature | Colima | Docker Desktop |
|---|---|---|
| License | MIT | Conditionally paid |
| GUI | None | Available |
| Extensions | None | Available |
Since Colima doesn’t have a GUI, be aware if you depend on Docker Desktop’s GUI. However, if you use a Docker CLI-based development workflow, you’ll get nearly the same experience.
With Colima, you can use Docker CLI on macOS without Docker Desktop.
brew install colima dockercolima startFor those concerned about Docker Desktop licensing or seeking a lighter environment, Colima is a great choice.
That’s all about setting up Colima + Docker CLI from the Gemba.