summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/rm.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/podman/rm.go b/cmd/podman/rm.go
index 7c0569b78..224df4543 100644
--- a/cmd/podman/rm.go
+++ b/cmd/podman/rm.go
@@ -21,6 +21,10 @@ var (
},
LatestFlag,
cli.BoolFlag{
+ Name: "sync",
+ Usage: "Sync container state with OCI runtime before removing",
+ },
+ cli.BoolFlag{
Name: "volumes, v",
Usage: "Remove the volumes associated with the container (Not implemented yet)",
},
@@ -73,6 +77,12 @@ func rmCmd(c *cli.Context) error {
for _, container := range delContainers {
con := container
f := func() error {
+ if c.Bool("sync") {
+ if err := con.Sync(); err != nil {
+ return err
+ }
+ }
+
return runtime.RemoveContainer(ctx, con, c.Bool("force"))
}