Colima - Docker Desktop Alternative
Colima stands for Containers in Lima, which, in turn, stands for Linux on Mac. Hence Containers in Linux on Mac. Colima replaces Docker Engine. Once Colima is installed and configured, you can interact with it using a regular docker client.
Advantages:
- faster than Docker Desktop
- supports cross-architecture builds
(Dis)Advantage:
- Colima is CLI-only, no GUI
If you need a GUI - look at Podman Desktop
Installation
brew install colima
Also:
brew install docker docker-compose
Do NOT install docker
via brew
with the --cask
switch. That will install
Docker Desktop instead of CLI.
Use
colima start --cpu 4 --memory 8
If an app reports
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
to resolve:
export DOCKER_HOST=unix://$HOME/.colima/docker.sock
Troubleshooting the Colima VM
Under the hood, Colima runs an Ubuntu VM which may need to be recycled.
Update and Reboot the Colima VM
$ colima ssh
user@colima:~$ sudo apt update -y && sudo apt upgrade -y
user@colima:~$ reboot
Reset the Colima VM
A more brute-force approach is to delete the VM and provision a new one.
First look at the VM state and how many resources are allocated
$ colima ls
$ colima delete -f
$ colima start -v --cpu 4 --memory 8
Note the -v
switch which will produce additional output that can be helpful.