mirror of
https://github.com/containers/podman.git
synced 2025-10-16 18:53:19 +08:00
Save --privileged state
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #255 Approved by: mheon
This commit is contained in:

committed by
Atomic Bot

parent
12e3d9d8a2
commit
50d4cd2868
@ -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 {
|
||||
|
Reference in New Issue
Block a user