-
-
Save kojilin/f6fa46e0519066a94c6cbf3925350f17 to your computer and use it in GitHub Desktop.
How to install Docker on macOS without using 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
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| # Install Docker CLI and Docker Compose, etc. | |
| brew install docker docker-compose docker-credential-helper | |
| # Configure Docker CLI. | |
| mkdir -p "$HOME/.docker/cli-plugins" | |
| ln -sfn '/opt/homebrew/opt/docker-compose/bin/docker-compose' "$HOME/.docker/cli-plugins/docker-compose" | |
| echo '{ | |
| "auths": {}, | |
| "credsStore": "osxkeychain", | |
| "currentContext": "colima" | |
| }' > "$HOME/.docker/config.json" | |
| # Install Colima and start the Docker engine with it when the current user logs in. | |
| brew install colima | |
| sudo ln -sfn "$HOME/.colima/docker.sock" /var/run/docker.sock | |
| sudo chown -R "$(id -u):$(id -g)" "$HOME/Library/LaunchAgents" | |
| brew services start colima |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment