Convert Figma logo to code with AI

lima-vm logolima

Linux virtual machines, with a focus on running containers

14,984
585
14,984
319

Top Related Projects

Podman Desktop - A graphical tool for developing on containers and Kubernetes

18,559

Container runtimes on macOS (and Linux) with minimal setup

Container Management and Kubernetes on the Desktop

:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:

68,457

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

7,892

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...

Quick Overview

Lima is an open-source project that aims to create a Linux virtual machine on macOS with automatic file sharing and port forwarding. It provides a user-friendly way to run Linux containers on macOS, similar to the experience of using Docker Desktop, but with better performance and customization options.

Pros

  • Easy to set up and use, with minimal configuration required
  • Supports various Linux distributions and custom images
  • Offers automatic file sharing between host and guest systems
  • Provides built-in port forwarding for seamless network access

Cons

  • Limited to macOS hosts, not available for Windows or Linux
  • May have compatibility issues with some macOS versions or hardware configurations
  • Performance can vary depending on the host system's resources
  • Requires command-line interface for most operations, which may be challenging for non-technical users

Getting Started

To get started with Lima, follow these steps:

  1. Install Lima using Homebrew:

    brew install lima
    
  2. Create and start a default Ubuntu instance:

    limactl start default
    
  3. Enter the Lima VM:

    lima
    
  4. To stop the VM when you're done:

    limactl stop default
    

For more advanced usage and configuration options, refer to the official Lima documentation on GitHub.

Competitor Comparisons

Podman Desktop - A graphical tool for developing on containers and Kubernetes

Pros of Podman Desktop

  • User-friendly GUI for container management
  • Supports multiple container engines (Podman, Docker)
  • Cross-platform compatibility (Windows, macOS, Linux)

Cons of Podman Desktop

  • Larger resource footprint due to GUI components
  • Less flexible for advanced command-line users
  • May have slower performance compared to CLI-only tools

Code Comparison

Lima:

# lima.yaml
images:
- location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
  arch: "x86_64"

Podman Desktop:

// No direct equivalent, as Podman Desktop uses a GUI
// Configuration is typically done through the interface

Lima focuses on lightweight VM creation for container environments, while Podman Desktop provides a graphical interface for managing containers across different engines. Lima is more suited for developers who prefer command-line tools and need fine-grained control over their development environment. Podman Desktop caters to users who want a more visual and user-friendly approach to container management, with the added benefit of supporting multiple container engines.

18,559

Container runtimes on macOS (and Linux) with minimal setup

Pros of Colima

  • Simpler setup and configuration process
  • Built-in Docker support without additional plugins
  • Better integration with macOS, including automatic file sharing

Cons of Colima

  • Less flexible and customizable than Lima
  • Limited to running a single VM instance
  • Fewer advanced features for power users

Code Comparison

Lima configuration example:

# lima.yaml
images:
- location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
  arch: "x86_64"

Colima configuration example:

# Command-line configuration
colima start --cpu 2 --memory 4 --disk 60

Lima focuses on a YAML-based configuration approach, allowing for more detailed VM setups. Colima, on the other hand, uses command-line arguments for a simpler configuration process.

Both projects aim to provide lightweight VM solutions for running containers on macOS, but they differ in their approach to user experience and flexibility. Lima offers more customization options and supports multiple VM instances, making it suitable for advanced users and complex setups. Colima prioritizes ease of use and seamless Docker integration, making it a good choice for users who want a quick and straightforward solution for running containers on macOS.

Container Management and Kubernetes on the Desktop

Pros of Rancher Desktop

  • Provides a full-featured Kubernetes environment out of the box
  • Offers a user-friendly GUI for managing containers and clusters
  • Includes built-in support for multiple container runtimes (containerd and Moby)

Cons of Rancher Desktop

  • Larger resource footprint due to additional features and GUI
  • May have a steeper learning curve for users unfamiliar with Kubernetes
  • Less flexible for customizing the underlying VM configuration

Code Comparison

Lima:

# Example lima.yaml configuration
images:
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
  arch: "x86_64"
  digest: "sha256:..."

Rancher Desktop:

# Example rancher-desktop.yaml configuration
kubernetes:
  version: v1.21.5+k3s2
  containerEngine: containerd

Both projects aim to provide lightweight VM environments for running containers on macOS and Linux, but they have different focuses. Lima is more lightweight and flexible, allowing users to configure custom VM images and settings. Rancher Desktop, on the other hand, provides a more comprehensive solution with built-in Kubernetes support and a graphical interface, making it easier for users to manage containers and clusters without extensive command-line knowledge.

:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:

Pros of Docker CE

  • More mature and widely adopted containerization platform
  • Extensive ecosystem with a large number of pre-built images
  • Better support for complex multi-container applications

Cons of Docker CE

  • Requires root privileges, potentially introducing security risks
  • More resource-intensive, especially for macOS and Windows users
  • Steeper learning curve for beginners

Code Comparison

Lima:

# lima.yaml
images:
- location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
  arch: "x86_64"

Docker CE:

# Dockerfile
FROM ubuntu:focal
RUN apt-get update && apt-get install -y nginx
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Lima focuses on lightweight VM management, while Docker CE emphasizes containerization. Lima's configuration is typically simpler, using YAML files to define VM settings. Docker CE uses Dockerfiles to build container images, offering more flexibility but requiring more detailed configuration.

Lima is designed for macOS users seeking a Linux-like environment, while Docker CE provides a more comprehensive containerization solution across multiple platforms. Lima offers better integration with macOS and lower resource usage, making it ideal for local development. Docker CE excels in production environments and complex application deployments.

68,457

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

Pros of Moby

  • More mature and widely adopted project with a larger community
  • Extensive ecosystem of tools and plugins
  • Supports a broader range of container-related features

Cons of Moby

  • Heavier resource footprint
  • More complex setup and configuration
  • Steeper learning curve for beginners

Code Comparison

Lima:

# lima.yaml
images:
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"
  arch: "x86_64"

Moby:

# Dockerfile
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y nginx
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Summary

Lima is a lightweight VM manager focused on simplicity and ease of use, particularly for macOS users. It's ideal for developers who need a quick, resource-efficient Linux environment.

Moby, on the other hand, is the open-source foundation of Docker, offering a comprehensive container platform. It's more suitable for complex containerization needs and production environments.

Choose Lima for a straightforward, VM-based development environment, or Moby for a full-featured container ecosystem with broader application support.

7,892

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...

Pros of nerdctl

  • Native containerd integration, offering direct access to containerd features
  • Broader container ecosystem support, including OCI image building and Compose
  • More advanced networking options and multi-platform image support

Cons of nerdctl

  • Requires more setup and configuration compared to Lima's out-of-the-box experience
  • Less focus on providing a complete VM-like environment for container development
  • May have a steeper learning curve for users new to container technologies

Code Comparison

Lima:

# lima.yaml
images:
- location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
  arch: "x86_64"

nerdctl:

# Using nerdctl
nerdctl run --name test-container -d nginx
nerdctl build -t myapp:latest .

Summary

Lima provides a simpler, VM-based approach to running containers on macOS, while nerdctl offers more advanced container management features and closer integration with containerd. Lima is easier to set up and use for beginners, whereas nerdctl provides more flexibility and control for experienced users working directly with container runtimes.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

[🌎Web site] [📖Documentation] [👤Slack (#lima)]

Shows a stylized 'Lima' text in bold, modern font

Lima: Linux Machines

OpenSSF Best Practices

Lima launches Linux virtual machines with automatic file sharing and port forwarding (similar to WSL2).

The original goal of Lima was to promote containerd including nerdctl (contaiNERD ctl) to Mac users, but Lima can be used for non-container applications as well.

Lima also supports other container engines (Docker, Podman, Kubernetes, etc.) and non-macOS hosts (Linux, NetBSD, etc.).

Getting started

Set up (on macOS):

brew install lima
limactl start

To run Linux commands:

lima sudo apt-get install -y neofetch
lima neofetch

To run containers with containerd:

lima nerdctl run --rm hello-world

To run containers with Docker:

limactl start template://docker
export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
docker run --rm hello-world

To run containers with Kubernetes:

limactl start template://k8s
export KUBECONFIG=$(limactl list k8s --format 'unix://{{.Dir}}/copied-from-guest/kubeconfig.yaml')
kubectl apply -f ...

See https://lima-vm.io/docs/ for the further information.

Community

Adopters

Container environments:

  • Rancher Desktop: Kubernetes and container management to the desktop
  • Colima: Docker (and Kubernetes) on macOS with minimal setup
  • Finch: Finch is a command line client for local container development
  • Podman Desktop: Podman Desktop GUI has a plug-in for Lima virtual machines

GUI:

Communication channels

Code of Conduct

Lima follows the CNCF Code of Conduct.


We are a Cloud Native Computing Foundation sandbox project.

The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see Trademark Usage.