mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Use a config file from the database if present
See issue https://github.com/docker/pinata/issues/690 Note there is not yet a restart mechanism. Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
parent
6df16df027
commit
77a5b0d032
@ -2,11 +2,10 @@
|
|||||||
|
|
||||||
export DOCKER_RAMDISK="true"
|
export DOCKER_RAMDISK="true"
|
||||||
|
|
||||||
DOCKER_OPTS="${DOCKER_OPTS:--s aufs}"
|
DOCKER_OPTS="${DOCKER_OPTS:- -s aufs}"
|
||||||
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
||||||
|
|
||||||
pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}"
|
pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}"
|
||||||
command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"
|
|
||||||
|
|
||||||
if cat /proc/cmdline | grep -q 'com.docker.groupDir'
|
if cat /proc/cmdline | grep -q 'com.docker.groupDir'
|
||||||
then
|
then
|
||||||
@ -14,6 +13,15 @@ then
|
|||||||
[ -d "${GROUPDIR}" ] && DOCKER_LOGFILE="${GROUPDIR}/${RC_SVCNAME}.log"
|
[ -d "${GROUPDIR}" ] && DOCKER_LOGFILE="${GROUPDIR}/${RC_SVCNAME}.log"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if cat /proc/cmdline | grep -q 'com.docker.database'
|
||||||
|
then
|
||||||
|
DATABASE="$(cat /proc/cmdline | sed -e 's/.*com.docker.database="//' -e 's/".*//')"
|
||||||
|
CONFIGFILE="/Database/branch/master/ro/${DATABASE}/etc/docker/daemon.json"
|
||||||
|
[ -s ${CONFIGFILE} ] && DOCKER_OPTS="${DOCKER_OPTS} -config-file ${CONFIG_FILE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"
|
||||||
|
|
||||||
DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}"
|
DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}"
|
||||||
start_stop_daemon_args="--background \
|
start_stop_daemon_args="--background \
|
||||||
--stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\""
|
--stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\""
|
||||||
|
Loading…
Reference in New Issue
Block a user