diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-07-14 13:32:55 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2022-07-26 13:34:12 -0400 |
commit | e4b82c77f7214a6d69c2a6112900dae92d505dc6 (patch) | |
tree | 02fb338baf35259592b4dc957f502fe7c3efa942 /cmd/podman/root.go | |
parent | 183fdea5f595886c799f804d3e7483d3bb0139c8 (diff) | |
download | podman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.tar.gz podman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.tar.bz2 podman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.zip |
Add --host and -H as equivalent options to --url
Docker supports -H and --host for specify the listening socket. Podman
should support them also in order to match the CLI.
These will not be documented since Podman defaults to using the
--url option.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/root.go')
-rw-r--r-- | cmd/podman/root.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go index 0520a0784..48f8470be 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -345,6 +345,8 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) { urlFlagName := "url" lFlags.StringVar(&opts.URI, urlFlagName, uri, "URL to access Podman service (CONTAINER_HOST)") _ = cmd.RegisterFlagCompletionFunc(urlFlagName, completion.AutocompleteDefault) + lFlags.StringVarP(&opts.URI, "host", "H", uri, "Used for Docker compatibility") + _ = lFlags.MarkHidden("host") // Context option added just for compatibility with DockerCLI. lFlags.String("context", "default", "Name of the context to use to connect to the daemon (This flag is a NOOP and provided solely for scripting compatibility.)") |