Today I learned about Lima and Colima, which help run Linux VMs and containers on macOS.
I learned about these tools while writing How To Install Docker. Although I’ve heard about them in the past, I kept forgetting what they were called, which is one reason I am writing about them now.
Lima
As this description states, Lima is similar to WSL. When using Windows, I have gotten used to a workflow based around WSL, both for Docker and with Git. I have not used macOS yet but expect to one day get a MacBook as a work laptop, and will have to learn an effective workflow for macOS.
Colima
Differences between Lima and Colima
Colima is basically a higher level usage of Lima and utilises Lima to provide Docker, Containerd and/or Kubernetes.
Colima is a third-party project that wraps Lima to provide an alternative user experience for launching containers.
The key difference is that Colima launches Docker by default, while Lima launches containerd by default.
It’s worth noting that current versions of Lima also support using Docker as a container runtime, and the same is true the other way: Colima supports using containerd as a container runtime.
Installation
Install Lima
# Homebrew
brew install lima# MacPorts
sudo port install lima# Nix
nix-env -i limaInstall Colima
Colima is available on Homebrew, MacPorts, and Nix. Check here for other installation options.
# Homebrew
brew install colima# MacPorts
sudo port install colima# Nix
nix-env -iA nixpkgs.colimaUsing Docker with Lima and Colima
Docker with Lima
Documentation / Examples / Containers / Docker | Lima
Lima Docker Rootless
limactl start template://docker
export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
docker run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpineLima Docker Rootful
limactl start template://docker-rootful
export DOCKER_HOST=$(limactl list docker-rootful --format 'unix://{{.Dir}}/sock/docker.sock')
docker run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpineDocker with Colima
Docker client is required for Docker runtime. Installable with brew brew install docker.
You can use the docker client on macOS after colima start with no additional setup.
brew install docker
colima startLinux Support
Both run on Linux hosts. Lima also supports non-macOS hosts (Linux, NetBSD, etc.) and Colima’s README lists Linux as supported.
There’s less reason to use Lima/Colima on Linux than on macOS, but it may still be useful in certain cases, since it is another way to run VMs on Linux.
Apple Container
After years of mac users using projects such as Lima, Colima and others in order to run containers on macOS, Apple released their own solution a few months ago: Container. This seems like a good solution that likely has good performance. Notably, this solution is not based on Docker, but can nevertheless run OCI containers.





