References:
- Goodbye Docker Desktop for Mac, Hello Colima
- Installing Colima as a Docker Engine provider with Buildx and Compose plugins installed
Colima is container runtimes on macOS (and Linux) with minimal setup, that has M1 macs support.
- Uninstall Docker Desktop
If you have Docker desktop installed, followed the references, both of them have a section on how to get rid of it.
- Install Docker Client with
brew
Make sure you brew is up to date and cashed cleaned up, just in case.
$ brew install docker
Check installation by doing
$ docker --version
$ docker version
Notice we haven't installed any Docker Engine yet.
- Install Colima
$ brew install colima
- Install Docker Compose Plugin (optional)
If you want to be able to run docker compose ...
follow this steps. Noticed I
said docker compose ...
not docker-compose ...
According to the official Docker documentation, run the following commands in a separate terminal:
Replace the link on the curl
step with the version you desired, find them here
https://github.com/docker/compose/releases/
$ DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
$ mkdir -p $DOCKER_CONFIG/cli-plugins
$ curl -SL https://github.com/docker/compose/releases/download/v2.24.6/docker-compose-darwin-aarch64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
Then add execution permission to the downloaded binary:
$ chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
Check it worked:
$ docker compose version
- Take it for a spin. (Example for the Ibis project)
$ colima start
Note: By default this starts with 2cpu and 2GB of memory, and 60GB disk
$ colima status
$ colima list
You can modify this, with --cpu
, --memory
and --disk
.
In the Ibis repo base directory
$ just up postgres
This will trigger a docker compose up. bash
$ pytest ibis/backends/postgres/tests
$ just down postgres
$ colima stop
Then you can start colima again with just colima start
. If you upgraded colima,
you need to delete the exisiting instance by doing. I also found that if you want
to modify the allocation, you need to delete the exisiting instance too (unless
you are going only up).
$ colima delete
Extra notes
- You can provide
--arch
tocolima start
to specify an architecture. - You can modify the
--runtime
(by defaultdocker
) to beconteinerd
. - You can enable kubernetes