Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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