Merge pull request #17450 from danishprakash/add-group-entry

create: add entry to /etc/group via `--group-entry`
This commit is contained in:
OpenShift Merge Robot
2023-02-28 21:59:59 +01:00
committed by GitHub
12 changed files with 72 additions and 6 deletions

View File

@ -2293,6 +2293,19 @@ func WithPasswdEntry(passwdEntry string) CtrCreateOption {
}
}
// WithGroupEntry sets the entry to write to the /etc/group file.
func WithGroupEntry(groupEntry string) CtrCreateOption {
return func(ctr *Container) error {
if ctr.valid {
return define.ErrCtrFinalized
}
ctr.config.GroupEntry = groupEntry
return nil
}
}
// WithMountAllDevices sets the option to mount all of a privileged container's
// host devices
func WithMountAllDevices() CtrCreateOption {