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