mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
Fix volume handling in podman
iFix builtin volumes to work with podman volume Currently builtin volumes are not recored in podman volumes when they are created automatically. This patch fixes this. Remove container volumes when requested Currently the --volume option on podman remove does nothing. This will implement the changes needed to remove the volumes if the user requests it. When removing a volume make sure that no container uses the volume. Signed-off-by: Daniel J Walsh dwalsh@redhat.com Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -131,9 +131,14 @@ func varlinkCreateToCreateConfig(ctx context.Context, create iopodman.Create, ru
|
||||
}
|
||||
|
||||
imageID := data.ID
|
||||
var ImageVolumes map[string]struct{}
|
||||
if data != nil && create.Image_volume_type != "ignore" {
|
||||
ImageVolumes = data.Config.Volumes
|
||||
}
|
||||
|
||||
config := &cc.CreateConfig{
|
||||
Runtime: runtime,
|
||||
BuiltinImgVolumes: data.Config.Volumes,
|
||||
BuiltinImgVolumes: ImageVolumes,
|
||||
ConmonPidFile: create.Conmon_pidfile,
|
||||
ImageVolumeType: create.Image_volume_type,
|
||||
CapAdd: create.Cap_add,
|
||||
|
Reference in New Issue
Block a user