unified and reworked docker container actions
This commit is contained in:
@@ -1,23 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# evaluate options through given arguments
|
||||
docker_root=
|
||||
while [[ $# > 0 ]]; do
|
||||
case $1 in
|
||||
-d | --dir) docker_root=$2; shift 2;;
|
||||
* ) break ;; # Anything else stops command line processing.
|
||||
esac
|
||||
done
|
||||
source ./dockerContainerAction.sh
|
||||
|
||||
if [[ -z $docker_root ]]; then
|
||||
docker_root=~/docker;
|
||||
fi
|
||||
|
||||
for subdir in $docker_root/*; do
|
||||
if [[ !(-d $subdir) ]]; then
|
||||
continue;
|
||||
fi
|
||||
cd $subdir;
|
||||
docker-compose up -d;
|
||||
done
|
||||
# FIXME!!! implement possibility to pass down directory
|
||||
upDownContainers up -d
|
||||
|
Reference in New Issue
Block a user