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 dockerCheck installation by doing
$ docker --version$ docker versionNotice 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-composeThen add execution permission to the downloaded binary:
$ chmod +x $DOCKER_CONFIG/cli-plugins/docker-composeCheck it worked:
$ docker compose version- Take it for a spin. (Example for the Ibis project)
$ colima startNote: By default this starts with 2cpu and 2GB of memory, and 60GB disk
$ colima status
$ colima listYou can modify this, with --cpu, --memory and --disk.
In the Ibis repo base directory
$ just up postgresThis will trigger a docker compose up. bash
$ pytest ibis/backends/postgres/tests
$ just down postgres$ colima stopThen 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 deleteExtra notes
- You can provide
--archtocolima startto specify an architecture. - You can modify the
--runtime(by defaultdocker) to beconteinerd. - You can enable kubernetes