1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #10225 from vbatts/vbatts-init_mount_namespaces

daemon mount namespaces
This commit is contained in:
Jessie Frazelle 2015-01-21 16:55:15 -08:00
commit fcc4abc870
2 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,7 @@ Requires=docker.socket
[Service] [Service]
ExecStart=/usr/bin/docker -d -H fd:// ExecStart=/usr/bin/docker -d -H fd://
MountFlags=slave
LimitNOFILE=1048576 LimitNOFILE=1048576
LimitNPROC=1048576 LimitNPROC=1048576

View file

@ -23,6 +23,7 @@
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
prog="docker" prog="docker"
unshare=/usr/bin/unshare
exec="/usr/bin/$prog" exec="/usr/bin/$prog"
pidfile="/var/run/$prog.pid" pidfile="/var/run/$prog.pid"
lockfile="/var/lock/subsys/$prog" lockfile="/var/lock/subsys/$prog"
@ -46,7 +47,7 @@ start() {
prestart prestart
printf "Starting $prog:\t" printf "Starting $prog:\t"
echo "\n$(date)\n" >> $logfile echo "\n$(date)\n" >> $logfile
$exec -d $other_args &>> $logfile & "$unshare" -m -- $exec -d $other_args &>> $logfile &
pid=$! pid=$!
touch $lockfile touch $lockfile
# wait up to 10 seconds for the pidfile to exist. see # wait up to 10 seconds for the pidfile to exist. see