some logic to choose graph driver, not just go with aufs

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
Justin Cormack 2016-01-20 14:49:30 +00:00
parent 77a5b0d032
commit 0261d732e4

View File

@ -2,7 +2,18 @@
export DOCKER_RAMDISK="true"
DOCKER_OPTS="${DOCKER_OPTS:- -s aufs}"
# choose a graph driver based on what is available and a preference
# if the user has not set any opts
# we do not yet provide easy access to /etc/conf.d/docker but may do
# otherwise let Docker choose
if cat /proc/filesystems | grep -q '\taufs$'
then
DOCKER_OPTS="${DOCKER_OPTS:- -s aufs}"
else if cat /proc/filesystems | grep -q '\toverlay$'
then
DOCKER_OPTS="${DOCKER_OPTS:- -s overlay}"
fi
command="${DOCKER_BINARY:-/usr/bin/docker}"
pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}"