move docker logs to host, see #447. Syslog still local

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
Justin Cormack 2016-01-15 15:20:04 +00:00
parent 6a0e6545cf
commit 7be084d189

View File

@ -7,6 +7,13 @@ command="${DOCKER_BINARY:-/usr/bin/docker}"
pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}"
command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"
if cat /proc/cmdline | grep -q 'com.docker.groupDir'
then
GROUPDIR="/Mac$(cat /proc/cmdline | sed -e 's/.*com.docker.groupDir="//' -e 's/".*//')"
[ -d ${GROUPDIR} ] && DOCKER_LOGFILE="${GROUPDIR}/${RC_SVCNAME}.log}"
fi
DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}"
start_stop_daemon_args="--background \
--stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\""