Last active
November 25, 2024 17:50
-
-
Save programaker/9003da00e5fe238313c6d5611520c762 to your computer and use it in GitHub Desktop.
Replace Docker Desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replacing Docker Desktop with Colima | |
https://jacobtomlinson.dev/posts/2022/goodbye-docker-desktop-for-mac-hello-colima/ | |
https://github.com/abiosoft/colima | |
https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#docker-socket-location | |
It allows us to keep using docker and docker-compose normally, which is good for legacy scripts. | |
--- | |
## Installation | |
1) Uninstall Docker Desktop | |
2) Install the things that were provided by Docker Desktop | |
`brew install docker docker-compose docker-buildx` | |
3) Install Colima | |
`brew install colima` | |
### NOTE - docker plugin shenanigans | |
`docker-compose` is now a docker plugin, as well as `docker-buildx`. To be able to use the good old `docker compose` and `docker build` commands, you need to make sure that: | |
The directory `/opt/homebrew/lib/docker/cli-plugins` contains symbolic links to `docker-compose` and `docker-buildx`. | |
The file `~/.docker/config.json` exists and contains the configuration below, which tells docker where the plugins directory is: | |
``` | |
{ | |
"cliPluginsExtraDirs": [ | |
"/opt/homebrew/lib/docker/cli-plugins" | |
] | |
} | |
``` | |
--- | |
## Configuration | |
Start Colima for the 1st time to change defaults | |
`colima start --edit` | |
Change these configs to match Docker Desktop's | |
``` | |
cpu: 4 | |
memory: 4 | |
autoActivate: false | |
``` | |
Tell docker to use the colima context | |
`docker context use colima` | |
...or add the following environment variable | |
`export DOCKER_HOST=unix://$HOME/.colima/default/docker.sock` | |
That's all! docker and docker-compose should work normally | |
The configs can be changed as many times as you want, you just need to stop colima first | |
`colima stop` | |
--- | |
## Usage | |
`colima start` | |
( do stuff with docker/docker-compose ) | |
`colima stop` | |
To check colima's status at any time: | |
`colima status` | |
--- | |
## Troubleshooting | |
Colima doesn't start after an update due to a QEMU missing apple security signature: https://github.com/lima-vm/lima/issues/1742 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment