mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08:00
Merge pull request #17450 from danishprakash/add-group-entry
create: add entry to /etc/group via `--group-entry`
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user