Colima

Last modified by Sebastian Marsching on 2023/03/21 18:34

Colima is an open-source alternative to Docker Desktop on Mac. It can easily be installed via Homebrew:

brew install colima docker docker-compose

By default, a virtual machine with 2 CPUs, 2 GB of memory, and 60 GB of storage is created. This can be modified through parameters to colima start.

colima stop
colima start --cpu 4 --memory 8 --disk 100

One can SSH into the VM where the Docker daemon is running with the colima ssh command, but usually this is not necessary. Instead, one can simply use the docker command directly in macOS like one would when using Docker Desktop.

The home directory is automatically mounted into the VM through SSHFS, so one can use bind mounts like the following one:

docker --rm -it -v $HOME/my-dir:/path-in-container image-name

Colima supports using Rosetta 2 for improved performance when running on ARM-based Macs:

colima start --arch aarch64 --vm-type=vz --vz-rosetta