Relabel container termination log if SELinux is enabled
This commit is contained in:
parent
7fb99442a6
commit
42ff2b3890
@ -666,6 +666,13 @@ func (dm *DockerManager) runContainer(
|
|||||||
} else {
|
} else {
|
||||||
fs.Close() // Close immediately; we're just doing a `touch` here
|
fs.Close() // Close immediately; we're just doing a `touch` here
|
||||||
b := fmt.Sprintf("%s:%s", containerLogPath, container.TerminationMessagePath)
|
b := fmt.Sprintf("%s:%s", containerLogPath, container.TerminationMessagePath)
|
||||||
|
|
||||||
|
// Have docker relabel the termination log path if SELinux is
|
||||||
|
// enabled.
|
||||||
|
if selinux.SELinuxEnabled() {
|
||||||
|
b += ":Z"
|
||||||
|
}
|
||||||
|
|
||||||
binds = append(binds, b)
|
binds = append(binds, b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user