diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-07-12 14:53:17 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-07-12 14:53:17 -0400 |
commit | c9a82d72a776348a7b98a26a58a8a913657fdc8c (patch) | |
tree | aedf12b02ea94c8f6ca7fa780a1d906ded12b662 /cmd | |
parent | edbfbfcda18f57c89a9657ba453c51977a7796a9 (diff) | |
download | podman-c9a82d72a776348a7b98a26a58a8a913657fdc8c.tar.gz podman-c9a82d72a776348a7b98a26a58a8a913657fdc8c.tar.bz2 podman-c9a82d72a776348a7b98a26a58a8a913657fdc8c.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')
-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) |