mirror of
https://github.com/containers/podman.git
synced 2025-10-14 17:55:51 +08:00
Must use mountlabel when creating builtin volumes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -1665,6 +1665,18 @@ func WithVolumeLabels(labels map[string]string) VolumeCreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithVolumeMountLabel sets the MountLabel of the volume.
|
||||
func WithVolumeMountLabel(mountLabel string) VolumeCreateOption {
|
||||
return func(volume *Volume) error {
|
||||
if volume.valid {
|
||||
return define.ErrVolumeFinalized
|
||||
}
|
||||
|
||||
volume.config.MountLabel = mountLabel
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithVolumeOptions sets the options of the volume.
|
||||
func WithVolumeOptions(options map[string]string) VolumeCreateOption {
|
||||
return func(volume *Volume) error {
|
||||
|
Reference in New Issue
Block a user