mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
fix early-docker issue by selecting newest docker daemon process
Signed-off-by: Dhawal Patel <dhawal.patel@nordstrom.com>
This commit is contained in:
parent
4522adb3b2
commit
a8cc89ce70
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ contains() {
|
||||||
get_command_line_args() {
|
get_command_line_args() {
|
||||||
PROC="$1"
|
PROC="$1"
|
||||||
|
|
||||||
for PID in $(pgrep -x -o "$PROC")
|
for PID in $(pgrep -f -n "$PROC")
|
||||||
do
|
do
|
||||||
tr "\0" " " < /proc/"$PID"/cmdline
|
tr "\0" " " < /proc/"$PID"/cmdline
|
||||||
done
|
done
|
||||||
|
@ -55,7 +55,7 @@ get_command_line_args() {
|
||||||
get_docker_cumulative_command_line_args() {
|
get_docker_cumulative_command_line_args() {
|
||||||
OPTION="$1"
|
OPTION="$1"
|
||||||
|
|
||||||
get_command_line_args docker |
|
get_command_line_args "docker daemon" |
|
||||||
# normalize known long options to their short versions
|
# normalize known long options to their short versions
|
||||||
sed \
|
sed \
|
||||||
-e 's/\-\-debug/-D/g' \
|
-e 's/\-\-debug/-D/g' \
|
||||||
|
|
Loading…
Reference in a new issue