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
#!/bin/bash | |
# add ability to use "docker service exec <SERVICE_NAME> <CMD>" for executing a task on a Docker service | |
# to use this script you need to expose Docker API over TCP on all nodes of you swarm cluster | |
declare -A NODE_IPS | |
# here list all nodes of you cluster | |
NODE_IPS[<NODE01_NAME>]="<NODE01_IP>" | |
NODE_IPS[<NODE02_NAME>]="<NODE02_IP>" | |
NODE_IPS[<NODE03_NAME>]="<NODE03_IP>" |