#!/bin/sh # If not in swarm mode, initialize swarm if [ -z "$(docker info --format '')" ]; then docker swarm init --advertise-addr $(hostname -i) fi