Last active
August 29, 2015 14:05
-
-
Save progrium/6536fc89af4a7dfeb6b1 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
source ./$(dirname $BASH_SOURCE)/libs | |
function start_containers { | |
args="$@" | |
cat $DOCKER_CONTAINERS_FILE | grep "^${args// /\\|^}" | parallel \ | |
--onall \ | |
--sshloginfile docker_nodes_${ENVIRONMENT} \ | |
--controlmaster \ | |
--tag \ | |
--retries 3 \ | |
"read name image args <<< {}; docker run \$args --name \$name \$image" | |
} | |
will_cite | |
start_containers $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment