If you’re a macOS user, chances are you’re familiar with Docker Desktop, the official Docker application for Mac. Docker Desktop offers a user-friendly interface that allows you to easily create and manage Docker containers. However, if you’re looking for a more lightweight and free alternative, you might want to check out Colima.

What is Colima?

Colima is a container runtime for macOS that is developed and maintained by the same team that created Laravel Valet. It is designed to be a minimalistic and lightweight alternative to Docker Desktop, offering a simple command-line interface that is easy to use and understand.

One of the most significant advantages of Colima over Docker Desktop is its speed. Because Colima is designed to be lightweight, it consumes fewer resources than Docker Desktop, which can be especially noticeable on older or less powerful Macs. Colima also starts up much faster than Docker Desktop, allowing you to get started with your containers in no time.

Features

  • Intel and M1 Macs support
  • Simple CLI interface
  • Docker and Containerd support
  • Port Forwarding
  • Volume mounts
  • Kubernetes
  • Multiple instances

How to Install Colima

Colima is available on homebrew, Run the below command to install it on macOS.

1
brew install colima

Using Colima

Colima is fully compatible with Docker CLI, so you can use all the Docker commands you know and love without any changes. To start using Colima, open Terminal and run the following command to start the Colima daemon:

1
colima start

Once the daemon is running, you can use Docker CLI to manage your containers just as you would with Docker Desktop. For example, to run an Nginx container, you can use the following command:

1
docker run -d -p 80:80 nginx

To stop Colima,

1
colima stop

To start Colima with kubernetes,

1
colima start --kubernetes

Customizing the VM

The default VM created by Colima has 2 CPUs, 2GiB memory and 60GiB storage.

The VM can be customized either by passing additional flags to colima start. e.g. –cpu, –memory, –disk, –runtime. Or by editing the config file with colima start –edit.

NOTE: disk size cannot be changed after the VM is created.

Customization Examples create VM with 1CPU, 2GiB memory and 10GiB storage.

1
colima start --cpu 1 --memory 2 --disk 10

modify an existing VM to 4CPUs and 8GiB memory.

1
2
colima stop
colima start --cpu 4 --memory 8

Conclusion

Colima is a lightweight, fast, and free alternative to Docker Desktop for macOS. It offers a minimalistic user interface, which is perfect for beginners who want to get started with containers without the hassle of learning a complicated UI. Colima is also fully compatible with Docker CLI, so you can use all the Docker commands you know and love, without any changes.

Another advantage of Colima over Docker Desktop is that it is free to use, even for companies. Docker Desktop has recently introduced new licensing terms that make it costly for businesses to use. With Colima, you can enjoy all the benefits of a container runtime, without worrying about licensing fees.

In summary, Colima is a great choice if you’re looking for a lightweight, fast, easy-to-use, and free container runtime for macOS. With the simple steps outlined in this blog post, you can easily install Colima and start using it to manage your containers today.