mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
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>
This commit is contained in:

committed by
Matthew Heon

parent
ffd2e6df9d
commit
b29a52a48a
@ -94,7 +94,7 @@ var _ = Describe("Podman run cpu", func() {
|
||||
Expect(result).Should(Exit(0))
|
||||
Expect(result.OutputToString()).To(Equal("10000"))
|
||||
} else {
|
||||
result := podmanTest.Podman([]string{"run", "--rm", "--cpu-shares=2", ALPINE, "cat", "/sys/fs/cgroup/cpu/cpu.shares"})
|
||||
result := podmanTest.Podman([]string{"run", "--rm", "-c", "2", ALPINE, "cat", "/sys/fs/cgroup/cpu/cpu.shares"})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result).Should(Exit(0))
|
||||
Expect(result.OutputToString()).To(Equal("2"))
|
||||
|
Reference in New Issue
Block a user