- build
- create
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
| ... | ... |
@@ -58,7 +58,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
| 58 | 58 |
dockerfileName := cmd.String([]string{"f", "-file"}, "", "Name of the Dockerfile (Default is 'PATH/Dockerfile')")
|
| 59 | 59 |
flMemoryString := cmd.String([]string{"m", "-memory"}, "", "Memory limit")
|
| 60 | 60 |
flMemorySwap := cmd.String([]string{"-memory-swap"}, "", "Total memory (memory + swap), '-1' to disable swap")
|
| 61 |
- flCPUShares := cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
| 61 |
+ flCPUShares := cmd.Int64([]string{"#c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
| 62 | 62 |
flCPUPeriod := cmd.Int64([]string{"-cpu-period"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) period")
|
| 63 | 63 |
flCPUQuota := cmd.Int64([]string{"-cpu-quota"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) quota")
|
| 64 | 64 |
flCPUSetCpus := cmd.String([]string{"-cpuset-cpus"}, "", "CPUs in which to allow execution (0-3, 0,1)")
|
| ... | ... |
@@ -466,7 +466,7 @@ _docker_build() {
|
| 466 | 466 |
--cgroup-parent |
| 467 | 467 |
--cpuset-cpus |
| 468 | 468 |
--cpuset-mems |
| 469 |
- --cpu-shares -c |
|
| 469 |
+ --cpu-shares |
|
| 470 | 470 |
--cpu-period |
| 471 | 471 |
--cpu-quota |
| 472 | 472 |
--file -f |
| ... | ... |
@@ -1310,7 +1310,7 @@ _docker_run() {
|
| 1310 | 1310 |
--cpu-quota |
| 1311 | 1311 |
--cpuset-cpus |
| 1312 | 1312 |
--cpuset-mems |
| 1313 |
- --cpu-shares -c |
|
| 1313 |
+ --cpu-shares |
|
| 1314 | 1314 |
--device |
| 1315 | 1315 |
--dns |
| 1316 | 1316 |
--dns-opt |
| ... | ... |
@@ -116,7 +116,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -l help -d 'Print u |
| 116 | 116 |
complete -c docker -f -n '__fish_docker_no_subcommand' -a create -d 'Create a new container' |
| 117 | 117 |
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s a -l attach -d 'Attach to STDIN, STDOUT or STDERR.' |
| 118 | 118 |
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l add-host -d 'Add a custom host-to-IP mapping (host:ip)' |
| 119 |
-complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s c -l cpu-shares -d 'CPU shares (relative weight)' |
|
| 119 |
+complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpu-shares -d 'CPU shares (relative weight)' |
|
| 120 | 120 |
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-add -d 'Add Linux capabilities' |
| 121 | 121 |
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-drop -d 'Drop Linux capabilities' |
| 122 | 122 |
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cidfile -d 'Write the container ID to the file' |
| ... | ... |
@@ -21,6 +21,8 @@ The following short variant options are deprecated in favor of their long |
| 21 | 21 |
variants: |
| 22 | 22 |
|
| 23 | 23 |
docker run -c (--cpu-shares) |
| 24 |
+ docker build -c (--cpu-shares) |
|
| 25 |
+ docker create -c (--cpu-shares) |
|
| 24 | 26 |
|
| 25 | 27 |
### Driver Specific Log Tags |
| 26 | 28 |
**Deprecated In Release: v1.9** |
| ... | ... |
@@ -15,7 +15,7 @@ parent = "smn_cli" |
| 15 | 15 |
Build a new image from the source code at PATH |
| 16 | 16 |
|
| 17 | 17 |
--build-arg=[] Set build-time variables |
| 18 |
- -c, --cpu-shares CPU Shares (relative weight) |
|
| 18 |
+ --cpu-shares CPU Shares (relative weight) |
|
| 19 | 19 |
--cgroup-parent="" Optional parent cgroup for the container |
| 20 | 20 |
--cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period |
| 21 | 21 |
--cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota |
| ... | ... |
@@ -121,7 +121,7 @@ To list the help on any command just execute the command, followed by the |
| 121 | 121 |
Run a command in a new container |
| 122 | 122 |
|
| 123 | 123 |
-a, --attach=[] Attach to STDIN, STDOUT or STDERR |
| 124 |
- -c, --cpu-shares=0 CPU shares (relative weight) |
|
| 124 |
+ --cpu-shares=0 CPU shares (relative weight) |
|
| 125 | 125 |
... |
| 126 | 126 |
|
| 127 | 127 |
## Option types |
| ... | ... |
@@ -19,7 +19,7 @@ Creates a new container. |
| 19 | 19 |
-a, --attach=[] Attach to STDIN, STDOUT or STDERR |
| 20 | 20 |
--add-host=[] Add a custom host-to-IP mapping (host:ip) |
| 21 | 21 |
--blkio-weight=0 Block IO weight (relative weight) |
| 22 |
- -c, --cpu-shares=0 CPU shares (relative weight) |
|
| 22 |
+ --cpu-shares=0 CPU shares (relative weight) |
|
| 23 | 23 |
--cap-add=[] Add Linux capabilities |
| 24 | 24 |
--cap-drop=[] Drop Linux capabilities |
| 25 | 25 |
--cgroup-parent="" Optional parent cgroup for the container |
| ... | ... |
@@ -17,7 +17,7 @@ parent = "smn_cli" |
| 17 | 17 |
-a, --attach=[] Attach to STDIN, STDOUT or STDERR |
| 18 | 18 |
--add-host=[] Add a custom host-to-IP mapping (host:ip) |
| 19 | 19 |
--blkio-weight=0 Block IO weight (relative weight) |
| 20 |
- -c, --cpu-shares=0 CPU shares (relative weight) |
|
| 20 |
+ --cpu-shares=0 CPU shares (relative weight) |
|
| 21 | 21 |
--cap-add=[] Add Linux capabilities |
| 22 | 22 |
--cap-drop=[] Drop Linux capabilities |
| 23 | 23 |
--cgroup-parent="" Optional parent cgroup for the container |
| ... | ... |
@@ -562,4 +562,4 @@ application change: |
| 562 | 562 |
5. Finally, we create a container that runs `tail -f access.log` using the logs |
| 563 | 563 |
volume from the `web` container, setting the workdir to `/var/log/httpd`. The |
| 564 | 564 |
`--rm` option means that when the container exits, the container's layer is |
| 565 |
- removed. |
|
| 566 | 565 |
\ No newline at end of file |
| 566 |
+ removed. |
| ... | ... |
@@ -7,7 +7,7 @@ docker-build - Build a new image from the source code at PATH |
| 7 | 7 |
# SYNOPSIS |
| 8 | 8 |
**docker build** |
| 9 | 9 |
[**--build-arg**[=*[]*]] |
| 10 |
-[**-c**|**--cpu-shares**[=*0*]] |
|
| 10 |
+[**--cpu-shares**[=*0*]] |
|
| 11 | 11 |
[**--cgroup-parent**[=*CGROUP-PARENT*]] |
| 12 | 12 |
[**--help**] |
| 13 | 13 |
[**-f**|**--file**[=*PATH/Dockerfile*]] |
| ... | ... |
@@ -90,7 +90,7 @@ set as the **URL**, the repository is cloned locally and then sent as the contex |
| 90 | 90 |
**--memory-swap**=*MEMORY-SWAP* |
| 91 | 91 |
Total memory (memory + swap), '-1' to disable swap. |
| 92 | 92 |
|
| 93 |
-**-c**, **--cpu-shares**=*0* |
|
| 93 |
+**--cpu-shares**=*0* |
|
| 94 | 94 |
CPU shares (relative weight). |
| 95 | 95 |
|
| 96 | 96 |
By default, all containers get the same proportion of CPU cycles. |
| ... | ... |
@@ -9,7 +9,7 @@ docker-create - Create a new container |
| 9 | 9 |
[**-a**|**--attach**[=*[]*]] |
| 10 | 10 |
[**--add-host**[=*[]*]] |
| 11 | 11 |
[**--blkio-weight**[=*[BLKIO-WEIGHT]*]] |
| 12 |
-[**-c**|**--cpu-shares**[=*0*]] |
|
| 12 |
+[**--cpu-shares**[=*0*]] |
|
| 13 | 13 |
[**--cap-add**[=*[]*]] |
| 14 | 14 |
[**--cap-drop**[=*[]*]] |
| 15 | 15 |
[**--cgroup-parent**[=*CGROUP-PATH*]] |
| ... | ... |
@@ -83,7 +83,7 @@ The initial status of the container created with **docker create** is 'created'. |
| 83 | 83 |
**--blkio-weight**=0 |
| 84 | 84 |
Block IO weight (relative weight) accepts a weight value between 10 and 1000. |
| 85 | 85 |
|
| 86 |
-**-c**, **--cpu-shares**=0 |
|
| 86 |
+**--cpu-shares**=0 |
|
| 87 | 87 |
CPU shares (relative weight) |
| 88 | 88 |
|
| 89 | 89 |
**--cap-add**=[] |
| ... | ... |
@@ -9,7 +9,7 @@ docker-run - Run a command in a new container |
| 9 | 9 |
[**-a**|**--attach**[=*[]*]] |
| 10 | 10 |
[**--add-host**[=*[]*]] |
| 11 | 11 |
[**--blkio-weight**[=*[BLKIO-WEIGHT]*]] |
| 12 |
-[**-c**|**--cpu-shares**[=*0*]] |
|
| 12 |
+[**--cpu-shares**[=*0*]] |
|
| 13 | 13 |
[**--cap-add**[=*[]*]] |
| 14 | 14 |
[**--cap-drop**[=*[]*]] |
| 15 | 15 |
[**--cgroup-parent**[=*CGROUP-PATH*]] |
| ... | ... |
@@ -100,14 +100,14 @@ option can be set multiple times. |
| 100 | 100 |
**--blkio-weight**=0 |
| 101 | 101 |
Block IO weight (relative weight) accepts a weight value between 10 and 1000. |
| 102 | 102 |
|
| 103 |
-**-c**, **--cpu-shares**=0 |
|
| 103 |
+**--cpu-shares**=0 |
|
| 104 | 104 |
CPU shares (relative weight) |
| 105 | 105 |
|
| 106 | 106 |
By default, all containers get the same proportion of CPU cycles. This proportion |
| 107 | 107 |
can be modified by changing the container's CPU share weighting relative |
| 108 | 108 |
to the weighting of all other running containers. |
| 109 | 109 |
|
| 110 |
-To modify the proportion from the default of 1024, use the **-c** or **--cpu-shares** |
|
| 110 |
+To modify the proportion from the default of 1024, use the **--cpu-shares** |
|
| 111 | 111 |
flag to set the weighting to 2 or higher. |
| 112 | 112 |
|
| 113 | 113 |
The proportion will only apply when CPU-intensive processes are running. |