Skip to content

Instantly share code, notes, and snippets.

@nishanttotla
nishanttotla / swarm-with-docker-machine.sh
Last active May 24, 2019 11:57
A bash script to set up a simple Docker Swarm cluster using Docker Machine
################################## INSTRUCTIONS ##################################
# 1. Make sure docker-machine is installed on your machine #
# 2. Download the file #
# 3. Run using $ . swarm-with-docker-machine.sh so that DOCKER_HOST is exported #
##################################################################################
# Remove any existing machines
docker-machine rm -y manager agent1 agent2
# Create machines