Merge pull request #156 from justincormack/nologcopy

Do not try to keep log files, fix #154
This commit is contained in:
Justin Cormack 2016-05-26 14:57:53 -07:00
commit a6ceb0a580

View File

@ -11,23 +11,10 @@ start()
ebegin "Starting Docker"
# shift logs onto host before docker starts
# try to keep initial log files, although there is a race
# busybox reopens its log files every second
if cat /proc/cmdline | grep -q 'com.docker.driverDir'
then
DRIVERDIR="/Mac$(cat /proc/cmdline | sed -e 's/.*com.docker.driverDir="//' -e 's/".*//')"
rm -rf /var/tmp/log
mkdir -p /var/tmp/log
for f in /var/log/*
do
cp -a $f /var/tmp/log/$(basename $f)
done
mount --bind "${DRIVERDIR}/log" /var/log
for f in /var/tmp/log/*
do
[ -f $f ] && cat $f >> /var/log/$(basename $f)
done
rm -rf /var/tmp/log
fi
command="${DOCKER_BINARY:-/usr/bin/docker}"