Skip to content

Commit

Permalink
Add podman rm --volumes flag
Browse files Browse the repository at this point in the history
While this is not implemented yet, it is needed for working with existing
docker scripts.

Signed-off-by: Daniel J Walsh <[email protected]>

Closes: containers#1460
Approved by: mheon
  • Loading branch information
rhatdan authored and rh-atomic-bot committed Sep 13, 2018
1 parent facab2a commit 61eda67
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cmd/podman/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ import (

var (
rmFlags = []cli.Flag{
cli.BoolFlag{
Name: "all, a",
Usage: "Remove all containers",
},
cli.BoolFlag{
Name: "force, f",
Usage: "Force removal of a running container. The default is false",
},
LatestFlag,
cli.BoolFlag{
Name: "all, a",
Usage: "Remove all containers",
Name: "volumes, v",
Usage: "Remove the volumes associated with the container (Not implemented yet)",
},
LatestFlag,
}
rmDescription = fmt.Sprintf(`
Podman rm will remove one or more containers from the host.
Expand Down
2 changes: 2 additions & 0 deletions completions/bash/podman
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,8 @@ _podman_rm() {
-f
--latest
-l
--volumes
-v
"

local options_with_args="
Expand Down
5 changes: 5 additions & 0 deletions docs/podman-rm.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Remove all containers. Can be used in conjunction with -f as well.

Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods.

**--volumes, -v**

Remove the volumes associated with the container. (Not yet implemented)

## EXAMPLE

podman rm mywebserver
Expand Down

0 comments on commit 61eda67

Please sign in to comment.