mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-07-26 20:47:50 +00:00
Merge fd9ad44344
into 16c235080d
This commit is contained in:
commit
0469ae6e12
2 changed files with 2 additions and 2 deletions
|
@ -255,7 +255,7 @@ check_5_6() {
|
|||
printcheck=0
|
||||
for c in $containers; do
|
||||
|
||||
processes=$(docker exec "$c" ps -el 2>/dev/null | grep -c sshd | awk '{print $1}')
|
||||
processes=$(docker inspect "$c" --format '{{ .State.Pid }}' 2>/dev/null | xargs pgrep -a -P 2>/dev/null | grep -c sshd | awk '{print $1}')
|
||||
if [ "$processes" -ge 1 ]; then
|
||||
# If it's the first container, fail the test
|
||||
if [ $fail -eq 0 ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue