Docker Desktop 的替代者 Colima

Colima 也已经大半年了,作为 Docker Desktop 的替代者用起来还是觉得不错的

目前最新版 0.4.2

项目地址

安装

这里只以 Homebrew 为例

1
brew install colima

大概有如下依赖

1
dependencies for colima: gdbm, ca-certificates, openssl@1.1, sqlite, python@3.9, glib, libtool, guile, nettle, libnghttp2, unbound, gnutls, libslirp, libusb, qemu and lima

更新

删除现有的 VM 实例

1
colima delete

Homebrew 更新

1
2
brew update
brew upgrade colima

start

1
colima start

使用

使用这块可以参考官方文档,底层的 runtime 默认是 Docker

kubernetes 为例,需要先安装 kubectl

1
brew install kubectl

然后再启动 colima

1
2
3
4
5
6
7
8
9
10
11
colima start --with-kubernetes

INFO[0000] starting colima
INFO[0000] runtime: docker+k3s
INFO[0000] preparing network ... context=vm
INFO[0000] starting ... context=vm
INFO[0030] provisioning ... context=docker
INFO[0030] starting ... context=docker
INFO[0035] provisioning ... context=kubernetes
INFO[0036] starting ... context=kubernetes
INFO[0040] done

查看状态

1
2
3
4
5
6
7
8
colima status

INFO[0000] colima is running
INFO[0000] arch: x86_64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/jakehu/.colima/default/docker.sock
INFO[0000] kubernetes: enabled