Skip to content

Instantly share code, notes, and snippets.

@barseghyanartur
Last active February 12, 2024 08:37
Show Gist options
  • Save barseghyanartur/3858a9916693057a01ec352fd3278329 to your computer and use it in GitHub Desktop.
Save barseghyanartur/3858a9916693057a01ec352fd3278329 to your computer and use it in GitHub Desktop.
Docker on macOs

Install Docker and Docker-Compose on macOs

Installation

  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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment