diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-02-14 13:21:52 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-02-14 13:21:52 -0500 |
commit | 52df1fa7e054d577e8416d1d46db1741ad324d4a (patch) | |
tree | 2d1212425257a8d332f4400d0896aa2e465176b0 /libpod/options.go | |
parent | dd82acd8ba02be51ec5fea65584e1f7b2036d7c8 (diff) | |
download | podman-52df1fa7e054d577e8416d1d46db1741ad324d4a.tar.gz podman-52df1fa7e054d577e8416d1d46db1741ad324d4a.tar.bz2 podman-52df1fa7e054d577e8416d1d46db1741ad324d4a.zip |
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>
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/options.go b/libpod/options.go index d965c058e..06737776b 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -11,6 +11,7 @@ import ( "github.com/containers/storage" "github.com/containers/storage/pkg/idtools" "github.com/cri-o/ocicni/pkg/ocicni" + spec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) @@ -1058,7 +1059,7 @@ func WithUserVolumes(volumes []string) CtrCreateOption { // from a container passed in to the --volumes-from flag. // This stores the built-in volume information in the Config so we can // add them when creating the container. -func WithLocalVolumes(volumes []string) CtrCreateOption { +func WithLocalVolumes(volumes []spec.Mount) CtrCreateOption { return func(ctr *Container) error { if ctr.valid { return ErrCtrFinalized |