mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Merge pull request #2730 from giuseppe/userns-take-rid-of-intermediate-mountns
userns: do not use an intermediate mount namespace
This commit is contained in:
@ -1274,6 +1274,28 @@ func WithVolumeName(name string) VolumeCreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithVolumeUID sets the uid of the owner.
|
||||
func WithVolumeUID(uid int) VolumeCreateOption {
|
||||
return func(volume *Volume) error {
|
||||
if volume.valid {
|
||||
return ErrVolumeFinalized
|
||||
}
|
||||
volume.config.UID = uid
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithVolumeGID sets the gid of the owner.
|
||||
func WithVolumeGID(gid int) VolumeCreateOption {
|
||||
return func(volume *Volume) error {
|
||||
if volume.valid {
|
||||
return ErrVolumeFinalized
|
||||
}
|
||||
volume.config.GID = gid
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithVolumeLabels sets the labels of the volume.
|
||||
func WithVolumeLabels(labels map[string]string) VolumeCreateOption {
|
||||
return func(volume *Volume) error {
|
||||
|
Reference in New Issue
Block a user