mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
Merge 3efee00b3d
into ff26d67f25
This commit is contained in:
commit
d17b476607
1 changed files with 6 additions and 0 deletions
|
@ -103,6 +103,8 @@ get_docker_effective_command_line_args() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_docker_configuration_file() {
|
get_docker_configuration_file() {
|
||||||
|
DOCKER_USER_HOME="$(grep -m1 "^$(ps -eo user,cmd | grep docker | grep -v grep |\
|
||||||
|
awk '{ print $1 }')" /etc/passwd | awk -F':' '{ print $6 }')"
|
||||||
FILE="$(get_docker_effective_command_line_args '--config-file' | \
|
FILE="$(get_docker_effective_command_line_args '--config-file' | \
|
||||||
sed 's/.*=//g')"
|
sed 's/.*=//g')"
|
||||||
|
|
||||||
|
@ -114,6 +116,10 @@ get_docker_configuration_file() {
|
||||||
CONFIG_FILE='/etc/docker/daemon.json'
|
CONFIG_FILE='/etc/docker/daemon.json'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
if [ -f "${DOCKER_USER_HOME}/.config/docker/daemon.json" ]; then
|
||||||
|
CONFIG_FILE="${DOCKER_USER_HOME}/.config/docker/daemon.json"
|
||||||
|
return
|
||||||
|
fi
|
||||||
CONFIG_FILE='/dev/null'
|
CONFIG_FILE='/dev/null'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue