summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@suse.com>2018-08-30 08:35:47 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-30 15:45:13 +0000
commit6751b2c3504096286977490d2eb70047f054e207 (patch)
tree864309d70710e90d2fb59d601aeb4911efe22ec8 /cmd/podman/create.go
parent65c31d49f967c9b1da0984897be08f6238bc7705 (diff)
downloadpodman-6751b2c3504096286977490d2eb70047f054e207.tar.gz
podman-6751b2c3504096286977490d2eb70047f054e207.tar.bz2
podman-6751b2c3504096286977490d2eb70047f054e207.zip
run/create: reserve `-h` flag for hostname
Move the `-h` short flag from `--help` to `--hostname` for podman-run, podman-create and podman-pod-create to be compatible with Docker. Fixes: #1367 Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #1373 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 78b206543..6b5151c1b 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -49,6 +49,7 @@ var createCommand = cli.Command{
Flags: createFlags,
Action: createCmd,
ArgsUsage: "IMAGE [COMMAND [ARG...]]",
+ HideHelp: true,
SkipArgReorder: true,
UseShortOptionHandling: true,
}
@@ -57,6 +58,12 @@ func createCmd(c *cli.Context) error {
// TODO should allow user to create based off a directory on the host not just image
// Need CLI support for this
+ // 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
}