sync/scripts/dockerContainerAction.sh

23 lines
478 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -euo pipefail
upDownContainers() {
# evaluate options through given arguments
docker_root=~/docker;
while [[ $# > 0 ]]; do
case $1 in
--dir) docker_root=$2; shift 2;;
* ) break ;; # Anything else stops command line processing.
esac
done
for subdir in $docker_root/*; do
if [[ !(-d $subdir) ]]; then
continue;
fi
cd $subdir;
2024-09-01 14:47:17 +02:00
docker compose $@;
done
}