fallback to default daemon.json

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2017-02-21 11:49:06 +01:00
parent 91eb958dd3
commit 072ff1cce3

View file

@ -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
}