mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
fallback to default daemon.json
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
03f5088d08
commit
1f499387c6
1 changed files with 8 additions and 1 deletions
|
@ -84,7 +84,14 @@ get_docker_configuration_file_args() {
|
|||
OPTION="$1"
|
||||
FILE="$(get_docker_effective_command_line_args '--config-file' | \
|
||||
sed 's/.*=//g')"
|
||||
if ! grep "$OPTION" "$FILE"; then
|
||||
|
||||
if [ -f "$FILE" ]; then
|
||||
CONFIG_FILE="$FILE"
|
||||
else
|
||||
CONFIG_FILE="/etc/docker/daemon.json"
|
||||
fi
|
||||
|
||||
if ! grep "$OPTION" "$CONFIG_FILE"; then
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue