Colima
Getting Started
Colima is an open-source alternative to Docker Desktop on Mac. It can easily be installed via Homebrew:
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 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:
Colima supports using Rosetta 2 for improved performance when running on ARM-based Macs:
Changing kernel variables with sysctl
For some applications (e.g. Elasticsearch) kernel parameters have to be changed with sysctl. In order to not have to do this manually everytime Colima is started, one can edit the Colima configuration using
Inside the editor, one can then add code that is supposed to be executed on startup. For example:
+ provision:
+ - mode: system
+ script: sysctl -w vm.max_map_count=262144
Please refer to this GitHub issue for details.