mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove volumes on docker run -rm
If we don't care about the container then we don't care about any volumes created with the run of that container Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
eb131250aa
commit
14acf6883d
1 changed files with 1 additions and 1 deletions
|
@ -2138,7 +2138,7 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
|||
if _, status, err = getExitCode(cli, runResult.ID); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, _, err := cli.call("DELETE", "/containers/"+runResult.ID, nil); err != nil {
|
||||
if _, _, err := cli.call("DELETE", "/containers/"+runResult.ID+"?v=1", nil); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue