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
91eb958dd3
commit
072ff1cce3
1 changed files with 8 additions and 1 deletions
|
@ -84,7 +84,14 @@ get_docker_configuration_file_args() {
|
||||||
OPTION="$1"
|
OPTION="$1"
|
||||||
FILE="$(get_docker_effective_command_line_args '--config-file' | \
|
FILE="$(get_docker_effective_command_line_args '--config-file' | \
|
||||||
sed 's/.*=//g')"
|
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
|
echo 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue