From 072ff1cce3a060c57f85d0d249b7b5ef385f43ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Tue, 21 Feb 2017 11:49:06 +0100 Subject: [PATCH] fallback to default daemon.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- helper_lib.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/helper_lib.sh b/helper_lib.sh index 0d2df7c..15934eb 100644 --- a/helper_lib.sh +++ b/helper_lib.sh @@ -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 }