colima
Run container runtimes on macOS
TLDR
Start the daemon in the background
Create a configuration file and use it
Start and setup containerd (install nerdctl to use containerd via nerdctl)
Start with Kubernetes (kubectl is required)
Customize CPU count, RAM memory and disk space (in GiB)
Use Docker via Colima (Docker is required)
List containers with their information and status
Show runtime status
SYNOPSIS
colima [COMMAND] [OPTIONS]
Common commands:
colima start [OPTIONS]
colima stop [PROFILE]
colima delete [PROFILE]
colima status [PROFILE]
colima ssh [PROFILE]
colima exec [PROFILE] COMMAND [ARGS...]
colima list
colima logs [PROFILE]
PARAMETERS
--cpu
Number of CPUs for the VM (default: 2).
--memory
Memory size for the VM (e.g., 2GB, 2048MB, default: 2GB).
--disk
Disk size for the VM (e.g., 60GB, 60000MB, default: 60GB).
--runtime
Container runtime to use (docker or containerd, default: docker).
--vm-type
VM type (qemu, vz, hyperkit, wsl2, default: auto-detected).
--profile
Profile name for managing multiple Colima instances (default: default).
--mount
Mount host directory into the VM (e.g., ~/myproject:/mnt/myproject). Can be specified multiple times.
--network-address
Enable host network address for direct access to the VM (default: true).
--ssh-agent
Enable SSH agent forwarding to the VM (default: false).
--dns
Specify a DNS server for the VM.
--kubernetes
Install Kubernetes (K3s) inside the VM (default: false).
DESCRIPTION
Colima provides a Docker-compatible environment on macOS and Linux, leveraging containerd and optionally the Docker CLI. It acts as a lightweight, open-source alternative to Docker Desktop, running a minimal Linux virtual machine to host container runtimes. Colima supports various VM backends, including QEMU, HyperKit, Virtualization.framework (macOS), and WSL2 (Windows), offering flexibility across different operating systems.
It simplifies the setup process, allowing developers to run Docker containers, build images, and manage services locally using familiar Docker commands, but without the overhead of Docker Desktop. Colima is built on top of the Lima (Linux on Mac) project and extends its functionality specifically for container orchestration and development workloads, making it a popular choice for resource-efficient local development environments.
CAVEATS
Colima relies on underlying VM technologies (QEMU, HyperKit, Virtualization.framework, WSL2) to operate. Ensure the appropriate virtualization software is installed and configured on your system.
While it provides a robust Docker-compatible environment, it does not include the graphical user interface (GUI) components or advanced integrated Kubernetes cluster management features found in Docker Desktop. It is primarily designed for command-line driven development workflows.
KEY FEATURES
Supports both Docker and containerd runtimes.
Configurable VM resources (CPU, memory, disk).
Multiple VM profiles for different projects.
Integration with existing Docker CLI.
Mounting of host directories into the VM.
Optional Kubernetes (K3s) support for local development.
Seamless networking and port forwarding.
USAGE WORKFLOW
1. Install Colima: Typically via Homebrew on macOS or Linux.
2. Start Colima: Run colima start (optional flags for resources, runtime).
3. Use Docker/Nerdctl: Once started, your existing docker or nerdctl commands will automatically connect to the Colima VM.
4. Stop/Delete: Use colima stop or colima delete when done to free up resources.
HISTORY
Colima emerged as a response to the increasing resource consumption and licensing changes of Docker Desktop. Built atop the open-source Lima (Linux on Mac) project, Colima simplifies the process of running container runtimes like Docker and containerd in a lightweight virtual machine. Its development aimed to provide a free, open-source, and resource-efficient alternative for local container development, gaining significant traction, especially among macOS users seeking a leaner solution. It abstracts away much of the manual configuration required for Lima, focusing specifically on container-related workflows.