From d1064bd441612244d7a560c6ceb3704ad12b23a6 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Fri, 16 Oct 2015 21:05:18 +0200 Subject: [PATCH] Deprecate -c cli short variant flag in docker cli - build - create Signed-off-by: Vincent Demeester --- api/client/build.go | 2 +- contrib/completion/bash/docker | 4 ++-- contrib/completion/fish/docker.fish | 2 +- docs/misc/deprecated.md | 2 ++ docs/reference/commandline/build.md | 2 +- docs/reference/commandline/cli.md | 2 +- docs/reference/commandline/create.md | 2 +- docs/reference/commandline/run.md | 4 ++-- man/docker-build.1.md | 4 ++-- man/docker-create.1.md | 4 ++-- man/docker-run.1.md | 6 +++--- 11 files changed, 18 insertions(+), 16 deletions(-) diff --git a/api/client/build.go b/api/client/build.go index e8b2d779de..2257868414 100644 --- a/api/client/build.go +++ b/api/client/build.go @@ -58,7 +58,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error { dockerfileName := cmd.String([]string{"f", "-file"}, "", "Name of the Dockerfile (Default is 'PATH/Dockerfile')") flMemoryString := cmd.String([]string{"m", "-memory"}, "", "Memory limit") flMemorySwap := cmd.String([]string{"-memory-swap"}, "", "Total memory (memory + swap), '-1' to disable swap") - flCPUShares := cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)") + flCPUShares := cmd.Int64([]string{"#c", "-cpu-shares"}, 0, "CPU shares (relative weight)") flCPUPeriod := cmd.Int64([]string{"-cpu-period"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) period") flCPUQuota := cmd.Int64([]string{"-cpu-quota"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) quota") flCPUSetCpus := cmd.String([]string{"-cpuset-cpus"}, "", "CPUs in which to allow execution (0-3, 0,1)") diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index feadfb043c..de2d24c533 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -466,7 +466,7 @@ _docker_build() { --cgroup-parent --cpuset-cpus --cpuset-mems - --cpu-shares -c + --cpu-shares --cpu-period --cpu-quota --file -f @@ -1310,7 +1310,7 @@ _docker_run() { --cpu-quota --cpuset-cpus --cpuset-mems - --cpu-shares -c + --cpu-shares --device --dns --dns-opt diff --git a/contrib/completion/fish/docker.fish b/contrib/completion/fish/docker.fish index 028c4822fd..e0fbcaa80c 100644 --- a/contrib/completion/fish/docker.fish +++ b/contrib/completion/fish/docker.fish @@ -116,7 +116,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -l help -d 'Print u complete -c docker -f -n '__fish_docker_no_subcommand' -a create -d 'Create a new container' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)' -complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s c -l cpu-shares -d 'CPU shares (relative weight)' +complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-shares -d 'CPU shares (relative weight)' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-add -d 'Add Linux capabilities' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-drop -d 'Drop Linux capabilities' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cidfile -d 'Write the container ID to the file' diff --git a/docs/misc/deprecated.md b/docs/misc/deprecated.md index 394e28685f..e5dd031977 100644 --- a/docs/misc/deprecated.md +++ b/docs/misc/deprecated.md @@ -21,6 +21,8 @@ The following short variant options are deprecated in favor of their long variants: docker run -c (--cpu-shares) + docker build -c (--cpu-shares) + docker create -c (--cpu-shares) ### Driver Specific Log Tags **Deprecated In Release: v1.9** diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index a0c6007597..23a34581f0 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -15,7 +15,7 @@ parent = "smn_cli" Build a new image from the source code at PATH --build-arg=[] Set build-time variables - -c, --cpu-shares CPU Shares (relative weight) + --cpu-shares CPU Shares (relative weight) --cgroup-parent="" Optional parent cgroup for the container --cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period --cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota diff --git a/docs/reference/commandline/cli.md b/docs/reference/commandline/cli.md index 2eba7636e1..78d1963d35 100644 --- a/docs/reference/commandline/cli.md +++ b/docs/reference/commandline/cli.md @@ -121,7 +121,7 @@ To list the help on any command just execute the command, followed by the Run a command in a new container -a, --attach=[] Attach to STDIN, STDOUT or STDERR - -c, --cpu-shares=0 CPU shares (relative weight) + --cpu-shares=0 CPU shares (relative weight) ... ## Option types diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index 3324fc2818..723bc90a0a 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -19,7 +19,7 @@ Creates a new container. -a, --attach=[] Attach to STDIN, STDOUT or STDERR --add-host=[] Add a custom host-to-IP mapping (host:ip) --blkio-weight=0 Block IO weight (relative weight) - -c, --cpu-shares=0 CPU shares (relative weight) + --cpu-shares=0 CPU shares (relative weight) --cap-add=[] Add Linux capabilities --cap-drop=[] Drop Linux capabilities --cgroup-parent="" Optional parent cgroup for the container diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 1229d1222d..c25c5f3235 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -17,7 +17,7 @@ parent = "smn_cli" -a, --attach=[] Attach to STDIN, STDOUT or STDERR --add-host=[] Add a custom host-to-IP mapping (host:ip) --blkio-weight=0 Block IO weight (relative weight) - -c, --cpu-shares=0 CPU shares (relative weight) + --cpu-shares=0 CPU shares (relative weight) --cap-add=[] Add Linux capabilities --cap-drop=[] Drop Linux capabilities --cgroup-parent="" Optional parent cgroup for the container @@ -562,4 +562,4 @@ application change: 5. Finally, we create a container that runs `tail -f access.log` using the logs volume from the `web` container, setting the workdir to `/var/log/httpd`. The `--rm` option means that when the container exits, the container's layer is - removed. \ No newline at end of file + removed. diff --git a/man/docker-build.1.md b/man/docker-build.1.md index 4bfadcbe49..876d6fa9bb 100644 --- a/man/docker-build.1.md +++ b/man/docker-build.1.md @@ -7,7 +7,7 @@ docker-build - Build a new image from the source code at PATH # SYNOPSIS **docker build** [**--build-arg**[=*[]*]] -[**-c**|**--cpu-shares**[=*0*]] +[**--cpu-shares**[=*0*]] [**--cgroup-parent**[=*CGROUP-PARENT*]] [**--help**] [**-f**|**--file**[=*PATH/Dockerfile*]] @@ -90,7 +90,7 @@ set as the **URL**, the repository is cloned locally and then sent as the contex **--memory-swap**=*MEMORY-SWAP* Total memory (memory + swap), '-1' to disable swap. -**-c**, **--cpu-shares**=*0* +**--cpu-shares**=*0* CPU shares (relative weight). By default, all containers get the same proportion of CPU cycles. diff --git a/man/docker-create.1.md b/man/docker-create.1.md index e845befe97..ecea12c5f8 100644 --- a/man/docker-create.1.md +++ b/man/docker-create.1.md @@ -9,7 +9,7 @@ docker-create - Create a new container [**-a**|**--attach**[=*[]*]] [**--add-host**[=*[]*]] [**--blkio-weight**[=*[BLKIO-WEIGHT]*]] -[**-c**|**--cpu-shares**[=*0*]] +[**--cpu-shares**[=*0*]] [**--cap-add**[=*[]*]] [**--cap-drop**[=*[]*]] [**--cgroup-parent**[=*CGROUP-PATH*]] @@ -83,7 +83,7 @@ The initial status of the container created with **docker create** is 'created'. **--blkio-weight**=0 Block IO weight (relative weight) accepts a weight value between 10 and 1000. -**-c**, **--cpu-shares**=0 +**--cpu-shares**=0 CPU shares (relative weight) **--cap-add**=[] diff --git a/man/docker-run.1.md b/man/docker-run.1.md index e59e414f3e..334d204a60 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -9,7 +9,7 @@ docker-run - Run a command in a new container [**-a**|**--attach**[=*[]*]] [**--add-host**[=*[]*]] [**--blkio-weight**[=*[BLKIO-WEIGHT]*]] -[**-c**|**--cpu-shares**[=*0*]] +[**--cpu-shares**[=*0*]] [**--cap-add**[=*[]*]] [**--cap-drop**[=*[]*]] [**--cgroup-parent**[=*CGROUP-PATH*]] @@ -100,14 +100,14 @@ option can be set multiple times. **--blkio-weight**=0 Block IO weight (relative weight) accepts a weight value between 10 and 1000. -**-c**, **--cpu-shares**=0 +**--cpu-shares**=0 CPU shares (relative weight) By default, all containers get the same proportion of CPU cycles. This proportion can be modified by changing the container's CPU share weighting relative to the weighting of all other running containers. -To modify the proportion from the default of 1024, use the **-c** or **--cpu-shares** +To modify the proportion from the default of 1024, use the **--cpu-shares** flag to set the weighting to 2 or higher. The proportion will only apply when CPU-intensive processes are running.