Created
January 10, 2024 11:37
-
-
Save trustin/bbf10f4161ca2a5c51b0118381ee5818 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