Pārlūkot izejas kodu

contrib/systemd: mount namespace and subtree flags

This systemd.exec setting will construct a new mount namespace for the
docker daemon, and use slave shared-subtree mounts so that volume mounts
propogate correctly into containers.

By having an unshared mount namespace for the daemon it ensures that
mount references are not held by other pids outside of the docker
daemon. Frequently this can be seen in EBUSY or "device or resource
busy" errors.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Vincent Batts 10 gadi atpakaļ
vecāks
revīzija
eb76cb2301
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      contrib/init/systemd/docker.service

+ 1 - 0
contrib/init/systemd/docker.service

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