mirror of https://github.com/k3s-io/k3s
Relabel container termination log if SELinux is enabled
parent
7fb99442a6
commit
42ff2b3890
|
@ -666,6 +666,13 @@ func (dm *DockerManager) runContainer(
|
|||
} else {
|
||||
fs.Close() // Close immediately; we're just doing a `touch` here
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue