Merge pull request #606 from justincormack/overlay2-default

Default to overlay2
This commit is contained in:
Justin Cormack 2016-10-13 16:34:43 +01:00 committed by GitHub
commit b76f5cb408

View File

@ -62,6 +62,9 @@ start()
mobyconfig get $f > $f
done
fi
[ -f /etc/docker/daemon.json ] || printf '{}' > /etc/docker/daemon.json
if mobyconfig exists network
then
NETWORK_MODE="$(mobyconfig get network | tr -d '[[:space:]]')"
@ -79,7 +82,15 @@ start()
fi
# Set Docker to debug debug if not specified in daemon.json
([ -f /etc/docker/daemon.json ] && cat /etc/docker/daemon.json | jq -e 'has("debug")' > /dev/null) || DOCKER_OPTS="${DOCKER_OPTS} --debug"
cat /etc/docker/daemon.json | jq -e 'has("debug")' > /dev/null || DOCKER_OPTS="${DOCKER_OPTS} --debug"
# choose storage driver
if ! $(cat /etc/docker/daemon.json | jq -e '."storage-driver"' > /dev/null)
then
STORAGE_DRIVER="overlay2"
[ -d /var/lib/docker/aufs ] && STORAGE_DRIVER="aufs"
DOCKER_OPTS="${DOCKER_OPTS} --storage-driver ${STORAGE_DRIVER}"
fi
# shift logs onto host before docker starts
# busybox reopens its log files every second