Since 1.9, the following short variant options have been
deprecated in favor of their long variants:
`docker run -c (--cpu-shares)`
`docker build -c (--cpu-shares)`
`docker create -c (--cpu-shares)`
`docker update -c (--cpu-shares)`
However, `-c` is still widely used and is considered as
a convenient option for swarm (see #16271).
This fix undeprecated the command line short
variant options of `-c` and updated the deprecated.md.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| ... | ... |
@@ -52,7 +52,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
| 52 | 52 |
flMemoryString := cmd.String([]string{"m", "-memory"}, "", "Memory limit")
|
| 53 | 53 |
flMemorySwap := cmd.String([]string{"-memory-swap"}, "", "Swap limit equal to memory plus swap: '-1' to enable unlimited swap")
|
| 54 | 54 |
flShmSize := cmd.String([]string{"-shm-size"}, "", "Size of /dev/shm, default value is 64MB")
|
| 55 |
- flCPUShares := cmd.Int64([]string{"#c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
| 55 |
+ flCPUShares := cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
| 56 | 56 |
flCPUPeriod := cmd.Int64([]string{"-cpu-period"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) period")
|
| 57 | 57 |
flCPUQuota := cmd.Int64([]string{"-cpu-quota"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) quota")
|
| 58 | 58 |
flCPUSetCpus := cmd.String([]string{"-cpuset-cpus"}, "", "CPUs in which to allow execution (0-3, 0,1)")
|
| ... | ... |
@@ -23,7 +23,7 @@ func (cli *DockerCli) CmdUpdate(args ...string) error {
|
| 23 | 23 |
flCPUQuota := cmd.Int64([]string{"-cpu-quota"}, 0, "Limit CPU CFS (Completely Fair Scheduler) quota")
|
| 24 | 24 |
flCpusetCpus := cmd.String([]string{"-cpuset-cpus"}, "", "CPUs in which to allow execution (0-3, 0,1)")
|
| 25 | 25 |
flCpusetMems := cmd.String([]string{"-cpuset-mems"}, "", "MEMs in which to allow execution (0-3, 0,1)")
|
| 26 |
- flCPUShares := cmd.Int64([]string{"#c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
| 26 |
+ flCPUShares := cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
| 27 | 27 |
flMemoryString := cmd.String([]string{"m", "-memory"}, "", "Memory limit")
|
| 28 | 28 |
flMemoryReservation := cmd.String([]string{"-memory-reservation"}, "", "Memory soft limit")
|
| 29 | 29 |
flMemorySwap := cmd.String([]string{"-memory-swap"}, "", "Swap limit equal to memory plus swap: '-1' to enable unlimited swap")
|
| ... | ... |
@@ -67,18 +67,6 @@ Use `docker ps --filter=before=...` and `docker ps --filter=since=...` instead. |
| 67 | 67 |
The `docker search --automated` and `docker search --stars` options are deprecated. |
| 68 | 68 |
Use `docker search --filter=is-automated=...` and `docker search --filter=stars=...` instead. |
| 69 | 69 |
|
| 70 |
-### Command line short variant options |
|
| 71 |
-**Deprecated In Release: v1.9** |
|
| 72 |
- |
|
| 73 |
-**Target For Removal In Release: v1.11** |
|
| 74 |
- |
|
| 75 |
-The following short variant options are deprecated in favor of their long |
|
| 76 |
-variants: |
|
| 77 |
- |
|
| 78 |
- docker run -c (--cpu-shares) |
|
| 79 |
- docker build -c (--cpu-shares) |
|
| 80 |
- docker create -c (--cpu-shares) |
|
| 81 |
- |
|
| 82 | 70 |
### Driver Specific Log Tags |
| 83 | 71 |
**Deprecated In Release: v1.9** |
| 84 | 72 |
|
| ... | ... |
@@ -76,7 +76,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*container.Config, *container.Host |
| 76 | 76 |
flKernelMemory = cmd.String([]string{"-kernel-memory"}, "", "Kernel memory limit")
|
| 77 | 77 |
flUser = cmd.String([]string{"u", "-user"}, "", "Username or UID (format: <name|uid>[:<group|gid>])")
|
| 78 | 78 |
flWorkingDir = cmd.String([]string{"w", "-workdir"}, "", "Working directory inside the container")
|
| 79 |
- flCPUShares = cmd.Int64([]string{"#c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
| 79 |
+ flCPUShares = cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
| 80 | 80 |
flCPUPercent = cmd.Int64([]string{"-cpu-percent"}, 0, "CPU percent (Windows only)")
|
| 81 | 81 |
flCPUPeriod = cmd.Int64([]string{"-cpu-period"}, 0, "Limit CPU CFS (Completely Fair Scheduler) period")
|
| 82 | 82 |
flCPUQuota = cmd.Int64([]string{"-cpu-quota"}, 0, "Limit CPU CFS (Completely Fair Scheduler) quota")
|