mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-31 01:34:23 +02:00
[CONT-8106] support for newer 'docker info' output that includes additional space
This commit is contained in:
parent
aa58736bd5
commit
7469b4aa72
@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
# Check total of containers
|
# Check total of containers
|
||||||
LogText "Test: checking total amount of Docker containers"
|
LogText "Test: checking total amount of Docker containers"
|
||||||
DOCKER_CONTAINERS_TOTAL=$(${DOCKERBINARY} info 2> /dev/null | ${GREPBINARY} "^Containers: " | ${AWKBINARY} '{ print $2 }')
|
DOCKER_CONTAINERS_TOTAL=$(${DOCKERBINARY} info 2> /dev/null | ${EGREPBINARY} "^[ \t]?Containers: " | ${AWKBINARY} '{ print $2 }')
|
||||||
if [ -z "${DOCKER_CONTAINERS_TOTAL}" ]; then
|
if [ -z "${DOCKER_CONTAINERS_TOTAL}" ]; then
|
||||||
DOCKER_CONTAINERS_TOTAL=0
|
DOCKER_CONTAINERS_TOTAL=0
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user