🐳 Colima — on-demand Docker / Kubernetes➜
Colima is a lightweight Linux VM that provides a Docker daemon (and optionally k3s) on macOS — without Docker Desktop.
The default policy here is on-demand: don't burn 4–8 GB of RAM on a VM you
aren't using. Helpers in ~/.zshrc start, stop, and inspect the VM, and the
starship prompt shows a 🐳 indicator whenever the VM is running so you never
forget it's eating resources in the background.
Prompt indicator
The 🐳 is a[custom.colima] segment defined in
zsh/starship.toml.
It checks ~/.colima/default/docker.sock (a stat() call, microseconds)
on every prompt.
Helpers➜
| Command | What it does |
|---|---|
colima-start |
Boot the VM with your configured CPU/memory/disk. No-op if already running. |
colima-stop |
Shut it down. |
colima-restart |
Stop, then start. |
colima-status |
Print the runtime, address, arch, and (if enabled) k8s status. |
colima-ssh |
SSH into the VM (handy for debugging mounts/networking). |
colima-nuke |
Destructive. Delete the VM entirely. Asks for y/N confirmation. |
Plus convenience aliases:
Tunables➜
Override these in ~/.zshrc.local (gitignored). Defaults are conservative for a
laptop:
export COLIMA_CPU=4 # CPU cores
export COLIMA_MEM=8 # memory in GB
export COLIMA_DISK=60 # disk in GB
export COLIMA_K8S=false # set to "true" to start k3s alongside Docker
Restart the VM after changing these:
Recipes➜
Set COLIMA_K8S=true (in ~/.zshrc.local for permanence, or just for one
shell), then start:
Then colima-restart to apply.
Colima registers a colima Docker context automatically. Switch back to
the default (e.g., Docker Desktop) with:
Hide the prompt indicator➜
If the 🐳 is too noisy, disable the custom segment:
Or remove ${custom.colima} from the format string entirely.
Troubleshooting➜
Permission denied connecting to Docker socket
Run colima status — if it says "stopped," start it. If running but you
still can't reach the socket, your DOCKER_HOST may be pointing elsewhere.
Try:
Slow first boot
Cold start downloads the Lima ubuntu image (~500 MB) the first time. Subsequent boots are 3–10 seconds.
Prompt feels laggy after colima-start
The detection (stat on the docker socket) is microseconds, so the
indicator itself isn't the cause. If your prompt feels slow, profile with
STARSHIP_LOG=trace starship explain.