1-HOST / swarm-init.sh
lain-iwakura's picture
Create swarm-init.sh
4d31ba6
raw
history blame contribute delete
153 Bytes
#!/bin/sh
# If not in swarm mode, initialize swarm
if [ -z "$(docker info --format '')" ]; then
docker swarm init --advertise-addr $(hostname -i)
fi