Wiki source code of Colima
Version 1.1 by Sebastian Marsching on 2023/03/21 18:34
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | [Colima](https://github.com/abiosoft/colima) is an open-source alternative to Docker Desktop on Mac. It can easily be installed via [Homebrew](https://brew.sh/): | ||
| 2 | |||
| 3 | ```sh | ||
| 4 | brew install colima docker docker-compose | ||
| 5 | ``` | ||
| 6 | |||
| 7 | By default, a virtual machine with 2 CPUs, 2 GB of memory, and 60 GB of storage is created. This can be modified through parameters to `colima start`. | ||
| 8 | |||
| 9 | ```sh | ||
| 10 | colima stop | ||
| 11 | colima start --cpu 4 --memory 8 --disk 100 | ||
| 12 | ``` | ||
| 13 | |||
| 14 | One can SSH into the VM where the Docker daemon is running with the `colima ssh` command, but usually this is not necessary. Instead, one can simply use the `docker` command directly in macOS like one would when using Docker Desktop. | ||
| 15 | |||
| 16 | The home directory is automatically mounted into the VM through SSHFS, so one can use bind mounts like the following one: | ||
| 17 | |||
| 18 | ```sh | ||
| 19 | docker --rm -it -v $HOME/my-dir:/path-in-container image-name | ||
| 20 | ``` | ||
| 21 | |||
| 22 | Colima supports using Rosetta 2 for improved performance when running on ARM-based Macs: | ||
| 23 | |||
| 24 | ```sh | ||
| 25 | colima start --arch aarch64 --vm-type=vz --vz-rosetta | ||
| 26 | ``` | ||
| 27 | |||
| 28 |