Skip to content

Instantly share code, notes, and snippets.

@vgroux
Last active August 31, 2023 19:02
Show Gist options
  • Save vgroux/76b6021cf949d966120724e2950f8f45 to your computer and use it in GitHub Desktop.
Save vgroux/76b6021cf949d966120724e2950f8f45 to your computer and use it in GitHub Desktop.
HOW TO Replacing Docker Desktop with Colima

Run docker in macos without docker desktop

Disclaimer: this work is not completely mine. Most of the work here is comming from:
https://dhwaneetbhatt.com/blog/run-docker-without-docker-desktop-on-macos
https://gist.github.com/juancsr/5927e6660d6ba5d2a34c61802d26e50a
and suggestions from my colleagues ❤️

Prepare

Stop Docker.
Delete Docker.app.

Run brew doctor and update to make sure everything is working and up to date

Prerequisite : have brew installed on your mac https://brew.sh/

$ brew doctor
$ brew update

Install Docker CLI

$ brew install docker
$ brew install docker-compose

Install Colima

via Homebrew

$ brew install colima

see more options here : https://github.com/abiosoft/colima#getting-started

Configure mem and cpu

$ colima start --cpu 4 --memory 8

You should now be good to go : docker and docker-compose now work as usual

Troubleshooting

failed to solve: XXXXX/YYYYYYYYY: failed to do request: Head "XXXXX/YYYYYYYYY": dial tcp: lookup registry-1.docker.io on 192.168.107.1:53: read udp 192.168.5.15:56530->192.168.107.1:53: i/o timeout

You may need to log in to a registry to pull an image https://docs.docker.com/engine/reference/commandline/login/

$ docker login
Username: 
Password:
@radzhome
Copy link

If we just edit installer.mac to include this instead of saying "docker not found" it should install automatically:

# Create and provision using docker
# Check for docker
if [ -z $(which docker) ]; then
    echo "Docker missing, will install it before proceeding"
    brew doctor
    brew update
    brew install docker
    brew install docker-compose
    brew install colima
    colima start --cpu 4 --memory 8
    # fix error:
    sed 's/credsStore/credStore/g' ~/.docker/config.json >  ~/.docker/config2.json && mv -f ~/.docker/config2.json ~/.docker/config.json
fi
cp docker-compose.mac.yml docker-compose.override.yml

#if [ ! -f .env_local ]; then
echo "Creating .env_local for local environment using .env_default settings"
cp .env_default .env_local

https://github.com/Postmedia-Digital/django-content-services/blob/gcp-rc-14.4.0/installer.mac#L40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment