399

GitHub - abiosoft/colima: Container runtimes on MacOS with minimal setup

 2 years ago
source link: https://github.com/abiosoft/colima
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Colima

Container runtimes on macOS with minimal setup.

Features

  • Simple CLI interface
  • Docker and Containerd support
  • Port Forwarding
  • Volume mounts
  • Kubernetes

Getting Started

Installation

Colima is available on Homebrew. Check here for other installation options.

brew install colima

Usage

Start Colima with defaults

colima start

For more usage options

colima --help
colima start --help

Runtimes

On initial startup, Colima initiates with a user specified runtime that defaults to Docker.

Docker

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.

Containerd

colima start --runtime containerd starts and setup Containerd. You can use colima nerdctl to interact with Containerd using nerdctl.

It is recommended to run colima nerdctl install to install nerdctl alias script in $PATH.

Kubernetes

kubectl is required for Kubernetes. Installable with brew install kubectl.

To enable Kubernetes, start Colima with --with-kubernetes flag.

colima start --with-kubernetes

Interacting with Image Registry

For Docker runtime, images built or pulled with Docker are accessible to Kubernetes.

For Containerd runtime, images built or pulled in the k8s.io namespace are accessible to Kubernetes.

Customizing the VM

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

The VM can be customized by passing --cpu, --memory and --disk to colima start. If VM is already created, stop the VM and apply the flags when starting it.

NOTE that only cpu and memory can be changed at anytime. Disk size cannot be changed after the VM is created.

Customization Examples

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

    colima start --cpu 1 --memory 2 --disk 10
    
  • modify an existing VM to 4CPUs and 8GiB memory.

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

Project Goal

To provide container runtimes on macOS with minimal setup.

What is with the name?

Colima means Containers in Lima.

Since Lima is aka Linux on Mac. By transitivity, Colima can also mean Containers on Linux on Mac.

Can it run alongside Docker for Mac?How to enable writable volumes?How to customize Docker config e.g. add insecure registries?How does it compare to minikube, Kind, K3d?Are M1 macs supported?

Help Wanted

  • Homebrew formula
  • Documentation page
  • Testing on M1 Macs

License


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK