mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Merge pull request #1535 from casperklein/patch-2
Improve container/image name detection
This commit is contained in:
commit
3ce36407b4
9
setup.sh
9
setup.sh
|
@ -27,11 +27,12 @@ fi
|
|||
|
||||
INFO=$($CRI ps \
|
||||
--no-trunc \
|
||||
--format="{{.Image}} {{.Names}} {{.Command}}" | \
|
||||
grep "supervisord -c /etc/supervisor/supervisord.conf")
|
||||
--format "{{.Image}};{{.Names}}" \
|
||||
--filter label=org.label-schema.name="docker-mailserver" | \
|
||||
tail -1)
|
||||
|
||||
IMAGE_NAME=$(echo $INFO | awk '{print $1}')
|
||||
CONTAINER_NAME=$(echo $INFO | awk '{print $2}')
|
||||
IMAGE_NAME=${INFO%;*}
|
||||
CONTAINER_NAME=${INFO#*;}
|
||||
DEFAULT_CONFIG_PATH="$(pwd)/config"
|
||||
USE_CONTAINER=false
|
||||
|
||||
|
|
Loading…
Reference in a new issue