summaryrefslogtreecommitdiff
path: root/pkg/adapter/containers.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-22 14:50:28 +0200
committerGitHub <noreply@github.com>2019-10-22 14:50:28 +0200
commitd358840ebe02f45ef782546fc3f8369ff2870ea5 (patch)
tree227224fadbbab6842ea33e8bd8e0ebc6dae941d4 /pkg/adapter/containers.go
parenta329328186f3b34581ee3326a62625d16264a136 (diff)
parent0d623914d01bcbc10beebf2db966e17da215dfbb (diff)
downloadpodman-d358840ebe02f45ef782546fc3f8369ff2870ea5.tar.gz
podman-d358840ebe02f45ef782546fc3f8369ff2870ea5.tar.bz2
podman-d358840ebe02f45ef782546fc3f8369ff2870ea5.zip
Merge pull request #4287 from mheon/anonymous_volumes
Add support for anonymous volumes to `podman run -v`
Diffstat (limited to 'pkg/adapter/containers.go')
-rw-r--r--pkg/adapter/containers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
index 5c33467a7..bff93cc9e 100644
--- a/pkg/adapter/containers.go
+++ b/pkg/adapter/containers.go
@@ -437,7 +437,7 @@ func (r *LocalRuntime) Run(ctx context.Context, c *cliconfig.RunValues, exitCode
}
if c.IsSet("rm") {
- if err := r.Runtime.RemoveContainer(ctx, ctr, false, false); err != nil {
+ if err := r.Runtime.RemoveContainer(ctx, ctr, false, true); err != nil {
logrus.Errorf("Error removing container %s: %v", ctr.ID(), err)
}
}
@@ -1053,7 +1053,7 @@ func (r *LocalRuntime) CleanupContainers(ctx context.Context, cli *cliconfig.Cle
// Only used when cleaning up containers
func removeContainer(ctx context.Context, ctr *libpod.Container, runtime *LocalRuntime) error {
- if err := runtime.RemoveContainer(ctx, ctr, false, false); err != nil {
+ if err := runtime.RemoveContainer(ctx, ctr, false, true); err != nil {
return errors.Wrapf(err, "failed to cleanup and remove container %v", ctr.ID())
}
return nil