Merge pull request #201 from ijc25/bind-aside-original-var-log

Bind aside original var log
This commit is contained in:
Justin Cormack 2016-06-13 14:22:22 +01:00 committed by GitHub
commit 6aeedee2f9

View File

@ -42,7 +42,7 @@ start()
export no_proxy="$(mobyconfig get proxy/exclude)"
fi
grep -q "osxfs /tmp" /etc/mtab || ( [ -d /Mac/tmp ] && mount --bind /Mac/tmp /tmp )
grep -q "osxfs /tmp" /proc/mounts || ( [ -d /Mac/tmp ] && mount --bind /Mac/tmp /tmp )
for d in Users Volumes private
do
@ -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