Docker Desktop can be quite resource hungry and full with bloatware, to have a minimal Docker setup, we can use Colima.
To install Colima, we can use brew:
brew install colima docker docker-composeFirst we need to create a Virtual Machine (VM) which will run Docker, to initalize it using colima, run this command for M1 chips:
colima start --cpu 4 --memory 5 --disk 60 --vm-type vz --vz-rosettaOr Intel chips:
colima start --cpu 4 --memory 5 --disk 60Check status with:
colima statusList and switch Docker's context using:
docker context ls
docker context use colimaTo make it permanent, add colima context to ~/.zshrc:
echo 'export DOCKER_CONTEXT=colima' >> ~/.zshrc
source ~/.zshrcDocker Compose can work fine without this step, but I prefer using docker compose instead of docker-compose, in order to do that, run:
mkdir -p ~/.docker/cli-plugins
ln -sfn $(brew --prefix)/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-composeCheck Compose version:
docker compose versioncolima start
colima stop
colima restartMake it start automatically upon boot:
brew services start colimaReference(s):