summaryrefslogtreecommitdiff
path: root/cmd/podman/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/run.go')
-rw-r--r--cmd/podman/run.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go
index f66b939d3..32e7b3510 100644
--- a/cmd/podman/run.go
+++ b/cmd/podman/run.go
@@ -10,6 +10,7 @@ import (
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/libpodruntime"
+ "github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/pkg/rootless"
opentracing "github.com/opentracing/opentracing-go"
@@ -39,10 +40,11 @@ var (
func init() {
runCommand.Command = _runCommand
+ runCommand.SetHelpTemplate(HelpTemplate())
runCommand.SetUsageTemplate(UsageTemplate())
flags := runCommand.Flags()
flags.SetInterspersed(false)
- flags.Bool("sig-proxy", true, "Proxy received signals to the process (default true)")
+ flags.Bool("sig-proxy", true, "Proxy received signals to the process")
getCreateFlags(&runCommand.PodmanCommand)
}
@@ -65,7 +67,7 @@ func runCmd(c *cliconfig.RunValues) error {
}
defer runtime.Shutdown(false)
- ctr, createConfig, err := createContainer(&c.PodmanCommand, runtime)
+ ctr, createConfig, err := shared.CreateContainer(getContext(), &c.PodmanCommand, runtime)
if err != nil {
return err
}
@@ -164,6 +166,10 @@ func runCmd(c *cliconfig.RunValues) error {
exitCode = int(ecode)
}
+ if c.IsSet("rm") {
+ runtime.RemoveContainer(ctx, ctr, false, true)
+ }
+
return nil
}