Merge pull request #1535 from casperklein/patch-2

Improve container/image name detection
This commit is contained in:
Erik Wramner 2020-06-14 20:10:51 +02:00 committed by GitHub
commit 3ce36407b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -27,11 +27,12 @@ fi
INFO=$($CRI ps \ INFO=$($CRI ps \
--no-trunc \ --no-trunc \
--format="{{.Image}} {{.Names}} {{.Command}}" | \ --format "{{.Image}};{{.Names}}" \
grep "supervisord -c /etc/supervisor/supervisord.conf") --filter label=org.label-schema.name="docker-mailserver" | \
tail -1)
IMAGE_NAME=$(echo $INFO | awk '{print $1}') IMAGE_NAME=${INFO%;*}
CONTAINER_NAME=$(echo $INFO | awk '{print $2}') CONTAINER_NAME=${INFO#*;}
DEFAULT_CONFIG_PATH="$(pwd)/config" DEFAULT_CONFIG_PATH="$(pwd)/config"
USE_CONTAINER=false USE_CONTAINER=false