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.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go
index 997068a55..a6d0526ff 100644
--- a/cmd/podman/run.go
+++ b/cmd/podman/run.go
@@ -34,12 +34,20 @@ var runCommand = cli.Command{
Flags: runFlags,
Action: runCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]",
+ HideHelp: true,
SkipArgReorder: true,
UseShortOptionHandling: true,
}
func runCmd(c *cli.Context) error {
var imageName string
+
+ // Docker-compatibility: the "-h" flag for run/create is reserved for
+ // the hostname (see https://github.com/containers/libpod/issues/1367).
+ if c.Bool("help") {
+ cli.ShowCommandHelpAndExit(c, "run", 0)
+ }
+
if err := validateFlags(c, createFlags); err != nil {
return err
}