- FAQs
- How does Colima compare to Lima?
- Are M1 macs supported?
- Can config file be used instead of cli flags?
- Docker
- How does Colima compare to minikube, Kind, K3d?
- Is another Distro supported?
- The Virtual Machine's IP is not reachable
- Are Lima overrides supported?
Colima is basically a higher level usage of Lima and utilises Lima to provide Docker, Containerd and/or Kubernetes.
Colima supports and works on M1 macs but not rigorously tested as the author do not currently possess an M1 device.
Feedbacks would be appreciated.
Yes, from v0.4.0, Colima support YAML configuration file.
colima start --edit
For manual edit, the config file is located at $HOME/.colima/default/colima.yaml
.
For other profiles, $HOME/.colima/<profile-name>/colima.yaml
colima template
For manual edit, the template file is located at $HOME/.colima/_templates/default.yaml
.
Set the $EDITOR
environment variable or use the --editor
flag.
colima start --edit --editor code # one-off config
colima template --editor code # default config
Yes, from version v0.3.0 Colima leverages Docker contexts and can thereby run alongside Docker for Mac.
Colima makes itself the default Docker context on startup and should work straight away.
Docker socket is located at $HOME/.colima/docker.sock
Docker socket is located at $HOME/.colima/default/docker.sock
It can also be retrieved by checking status
colima status
docker context list
docker context use <context-name>
Colima uses Docker contexts to allow co-existence with other Docker servers and sets itself as the default Docker context on startup.
However, some applications are not aware of Docker contexts and may lead to the error.
This can be fixed by any of the following approaches. Ensure the Docker socket path by checking the socket location.
-
Setting application specific Docker socket path if supported by the application. e.g. JetBrains IDEs.
-
Setting the
DOCKER_HOST
environment variable to point to Colima socket.export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock"
-
Linking the Colima socket to the default socket path. Note that this may break other Docker servers.
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
-
v0.3.4 or lower
On first startup, Colima generates Docker daemon.json file at
$HOME/.colima/docker/daemon.json
. Modify the daemon.json file accordingly and restart Colima. -
v0.4.0 or newer
Start Colima with
--edit
flag.colima start --edit
Add the Docker config to the
docker
section.- docker: {} + docker: + insecure-registries: + - myregistry.com:5000 + - host.docker.internal:5000
Both buildx and scan can be installed as Docker plugins
ARCH=amd64 # change to 'arm64' for m1
VERSION=v0.8.2
curl -LO https://github.com/docker/buildx/releases/download/${VERSION}/buildx-${VERSION}.darwin-${ARCH}
mkdir -p ~/.docker/cli-plugins
mv buildx-${VERSION}.darwin-${ARCH} ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx
docker buildx version # verify installation
Install Synk CLI
brew install snyk/tap/snyk
Install Docker Scan
ARCH=amd64 # change to 'arm64' for m1
VERSION=v0.17.0
curl -LO https://github.com/docker/scan-cli-plugin/releases/download/${VERSION}/docker-scan_darwin_${ARCH}
mkdir -p ~/.docker/cli-plugins
mv docker-scan_darwin_${ARCH} ~/.docker/cli-plugins/docker-scan
chmod +x ~/.docker/cli-plugins/docker-scan
docker scan --version # verify installation
Yes, you can create a Kubernetes cluster with minikube (with Docker driver), Kind or K3d instead of enabling Kubernetes in Colima.
Those are better options if you need multiple clusters, or do not need Docker and Kubernetes to share the same images and runtime.
Colima with Docker runtime is fully compatible with Minikube (with Docker driver), Kind and K3d.
Minikube with Docker runtime can expose the cluster's Docker with minikube docker-env
. But there are some caveats.
-
Kubernetes is not optional, even if you only need Docker.
-
All of minikube's free drivers for macOS fall-short in one of performance, port forwarding or volumes. While port-forwarding and volumes are non-issue for Kubernetes, they can be a deal breaker for Docker-only use.
Colima uses a lightweight Alpine image with bundled dependencies. Therefore, user interaction with the Virtual Machine is expected to be minimal (if any).
However, Colima optionally provides Ubuntu container as a layer.
-
CLI
colima start --layer=true
-
Config
- layer: false + layer: true
When the layer is enabled, the underlying Virtual Machine is abstracted and both the ssh
and ssh-config
commands routes to the layer.
The underlying Virtual Machine is still accessible by specifying --layer=false
to the ssh
and ssh-config
commands, or by running colima
in the SSH session.
This is by design. Reachable IP address is not enabled by default because it requires root access.
NOTE: this is only supported on macOS
- CLI
colima start --network-address
- Config
network: - address: false + address: true
Yes, however this should only be done by advanced users.
Overriding the image is not supported as Colima's image includes bundled dependencies that would be missing in the user specified image.