diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-07-12 14:53:17 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2022-07-26 13:05:59 -0400 |
commit | b29a52a48a9cbe65f47cbdbb618366421ee851b5 (patch) | |
tree | e552fe35d6eb4b0062b02efa58072a05c9f31f7c /cmd/podman/common | |
parent | ffd2e6df9dd624865b3aebe024e1ccfa5f554895 (diff) | |
download | podman-b29a52a48a9cbe65f47cbdbb618366421ee851b5.tar.gz podman-b29a52a48a9cbe65f47cbdbb618366421ee851b5.tar.bz2 podman-b29a52a48a9cbe65f47cbdbb618366421ee851b5.zip |
Docker uses "-c" to mean "--cpu-shares" in create and run
Add support for -c as an alias for --cpu-shares to be compatible with
Docker.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/common')
-rw-r--r-- | cmd/podman/common/create.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 923d0517f..d2646aa43 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -849,9 +849,9 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, _ = cmd.RegisterFlagCompletionFunc(cpuRtRuntimeFlagName, completion.AutocompleteNone) cpuSharesFlagName := "cpu-shares" - createFlags.Uint64Var( + createFlags.Uint64VarP( &cf.CPUShares, - cpuSharesFlagName, 0, + cpuSharesFlagName, "c", 0, "CPU shares (relative weight)", ) _ = cmd.RegisterFlagCompletionFunc(cpuSharesFlagName, completion.AutocompleteNone) |