Bind the original /var/log onto /run/log

So that it can be inspected while debugging.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
Ian Campbell 2016-06-13 11:01:15 +01:00
parent 4d4ea240a8
commit a0f2582aba

View File

@ -54,7 +54,11 @@ start()
if cat /proc/cmdline | grep -q 'com.docker.driverDir'
then
DRIVERDIR="/Mac$(cat /proc/cmdline | sed -e 's/.*com.docker.driverDir="//' -e 's/".*//')"
grep -q "osxfs on /var/log" /proc/mounts || mount --bind "${DRIVERDIR}/log" /var/log
if ! grep -q "osxfs on /var/log" /proc/mounts ; then
mkdir /run/log
mount -o bind /var/log /run/log
mount --bind "${DRIVERDIR}/log" /var/log
fi
fi
# same default ulimit as boot2docker; if you want more can set at docker run time