Skip to content

Instantly share code, notes, and snippets.

@barseghyanartur
Last active November 20, 2025 15:42
Show Gist options
  • Select an option

  • Save barseghyanartur/3858a9916693057a01ec352fd3278329 to your computer and use it in GitHub Desktop.

Select an option

Save barseghyanartur/3858a9916693057a01ec352fd3278329 to your computer and use it in GitHub Desktop.
Docker on macOs

Install Docker and Docker-Compose on macOs

IMPORTANT

I don't recommend using colima on macOS. Proceed either with Docker Desktop or Podman Desktop.

Installation

Note

See the note of ciarancourtney.

  1. Install Docker, Docker Compose and colima using brew

    brew install docker
    brew install docker-compose
    brew install docker-buildx
    brew install colima
  2. Start the colima service

    brew services start colima
    colima start
  3. Add the following line to your .zshrc

    export DOCKER_HOST=unix:///$HOME/.colima/docker.sock
    
  4. Make sure docker compose command is available

    mkdir -p ~/.docker/cli-plugins/
    ln -sfn /opt/homebrew/bin/docker-compose ~/.docker/cli-plugins/docker-compose

Troubleshooting

  1. Delete default colima profile:

    colima delete default
  2. Delete ~/.colima:

    rm -rf ~/.colima
  3. Reinstall colima:

    brew reinstall colima
  4. Start colima:

    colima start
@ciarancourtney
Copy link

You should add ln -sfn /opt/homebrew/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx and step 3 should be marked as optional or added to appendix per https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running

@barseghyanartur
Copy link
Author

@ciarancourtney: Thanks! I updated the gist.

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