Save --privileged state

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #255
Approved by: mheon
This commit is contained in:
Daniel J Walsh
2018-01-23 17:12:13 +01:00
committed by Atomic Bot
parent 12e3d9d8a2
commit 50d4cd2868
4 changed files with 48 additions and 1 deletions

View File

@ -268,6 +268,18 @@ func WithShmSize(size int64) CtrCreateOption {
}
}
// WithPrivileged sets the privileged flag in the container runtime
func WithPrivileged(privileged bool) CtrCreateOption {
return func(ctr *Container) error {
if ctr.valid {
return ErrCtrFinalized
}
ctr.config.Privileged = privileged
return nil
}
}
// WithSELinuxLabels sets the mount label for SELinux
func WithSELinuxLabels(processLabel, mountLabel string) CtrCreateOption {
return func(ctr *Container) error {