Skip to content

Commit eb76cb2

Browse files
committed
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>
1 parent 092d522 commit eb76cb2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/init/systemd/docker.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Requires=docker.socket
66

77
[Service]
88
ExecStart=/usr/bin/docker -d -H fd://
9+
MountFlags=slave
910
LimitNOFILE=1048576
1011
LimitNPROC=1048576
1112

0 commit comments

Comments
 (0)