mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Return only one result, if there are multiple matches
Among other things, this is the case, when running tests with multiple containers.
This commit is contained in:
parent
8c7597f546
commit
29406ff34d
2
setup.sh
2
setup.sh
|
@ -25,7 +25,7 @@ if [ -z "$CRI" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
INFO=$($CRI ps --no-trunc --format "{{.Image}};{{.Names}}" --filter label=org.label-schema.name="docker-mailserver")
|
||||
INFO=$($CRI ps --no-trunc --format "{{.Image}};{{.Names}}" --filter label=org.label-schema.name="docker-mailserver" | tail -1)
|
||||
|
||||
IMAGE_NAME=${INFO%;*}
|
||||
CONTAINER_NAME=${INFO#*;}
|
||||
|
|
Loading…
Reference in a new issue