remove transfused dependency from hostsettings by putting log mounts in docker startup

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-06-10 11:26:32 +01:00
parent 57cf060668
commit 31c5b24513
2 changed files with 8 additions and 9 deletions

View File

@ -49,6 +49,14 @@ start()
[ -d /Mac/$d ] && [ ! -d $d ] && mkdir -p /$d && mount --bind /Mac/$d /$d
done
# shift logs onto host before docker starts
# 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/".*//')"
grep -q "osxfs on /var/log" || mount --bind "${DRIVERDIR}/log" /var/log
fi
# same default ulimit as boot2docker; if you want more can set at docker run time
DOCKER_ULIMITS=1048576
ulimit -n $DOCKER_ULIMITS

View File

@ -3,7 +3,6 @@
description="Configuring settings from database."
depend() {
need transfused
before sysctl net
}
@ -12,14 +11,6 @@ start() {
mobyconfig exists etc/sysctl.conf && mobyconfig get etc/sysctl.conf > /etc/sysctl.conf
# shift logs onto host before docker starts
# 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/".*//')"
mount --bind "${DRIVERDIR}/log" /var/log
fi
mobyconfig exists etc/resolv.conf && mobyconfig get etc/resolv.conf > /etc/resolv.conf
# handle static network config if configured