# Install VirtualBox
brew install --cask virtualbox
# Install Docker (CLI), Docker Machine, and Docker Compose
brew install docker docker-machine docker-compose
# Use Docker Machine to create a VirtualBox VM that runs Docker
docker-machine create --driver virtualbox default
# Start docker-machine on boot
brew services start docker-machine
# Set up current environment to point local Docker CLI to remote
# Docker host running on VirtualBox (have to run this every terminal)
eval $(docker-machine env default)
# If you want to automatically set up `docker-machine` environment
# when you open a terminal, put the following in `~/.bash_profile`
if command -v docker-machine > /dev/null; then
machine=$(docker-machine ls | grep "Running" | head -n 1 | awk '{ print $1 }')
if [ "$machine" != "" ]; then
eval "$(docker-machine env $machine)"
fi
fi
Last active
January 28, 2022 14:51
-
-
Save mdwheele/297829d40b7be8222a251eb091891a26 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment