Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
| ... | ... |
@@ -25,10 +25,10 @@ Creates a new container. |
| 25 | 25 |
--cap-drop=[] Drop Linux capabilities |
| 26 | 26 |
--cgroup-parent="" Optional parent cgroup for the container |
| 27 | 27 |
--cidfile="" Write the container ID to the file |
| 28 |
+ --cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period |
|
| 29 |
+ --cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota |
|
| 28 | 30 |
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) |
| 29 | 31 |
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) |
| 30 |
- --cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period |
|
| 31 |
- --cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota |
|
| 32 | 32 |
--device=[] Add a host device to the container |
| 33 | 33 |
--dns=[] Set custom DNS servers |
| 34 | 34 |
--dns-search=[] Set custom DNS search domains |
| ... | ... |
@@ -37,6 +37,7 @@ Creates a new container. |
| 37 | 37 |
--env-file=[] Read in a file of environment variables |
| 38 | 38 |
--expose=[] Expose a port or a range of ports |
| 39 | 39 |
-h, --hostname="" Container host name |
| 40 |
+ --help=false Print usage |
|
| 40 | 41 |
-i, --interactive=false Keep STDIN open even if not attached |
| 41 | 42 |
--ipc="" IPC namespace to use |
| 42 | 43 |
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) |
| ... | ... |
@@ -47,20 +48,22 @@ Creates a new container. |
| 47 | 47 |
--lxc-conf=[] Add custom lxc options |
| 48 | 48 |
-m, --memory="" Memory limit |
| 49 | 49 |
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) |
| 50 |
+ --memory-swap="" Total memory (memory + swap), '-1' to disable swap |
|
| 51 |
+ --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| 50 | 52 |
--name="" Assign a name to the container |
| 51 | 53 |
--net="bridge" Set the Network mode for the container |
| 52 | 54 |
--oom-kill-disable=false Whether to disable OOM Killer for the container or not |
| 53 | 55 |
-P, --publish-all=false Publish all exposed ports to random ports |
| 54 | 56 |
-p, --publish=[] Publish a container's port(s) to the host |
| 55 | 57 |
--pid="" PID namespace to use |
| 56 |
- --uts="" UTS namespace to use |
|
| 57 | 58 |
--privileged=false Give extended privileges to this container |
| 58 | 59 |
--read-only=false Mount the container's root filesystem as read only |
| 59 | 60 |
--restart="no" Restart policy (no, on-failure[:max-retry], always) |
| 60 |
- --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| 61 | 61 |
--security-opt=[] Security options |
| 62 | 62 |
-t, --tty=false Allocate a pseudo-TTY |
| 63 | 63 |
-u, --user="" Username or UID |
| 64 |
+ --ulimit=[] Ulimit options |
|
| 65 |
+ --uts="" UTS namespace to use |
|
| 64 | 66 |
-v, --volume=[] Bind mount a volume |
| 65 | 67 |
--volumes-from=[] Mount volumes from the specified container(s) |
| 66 | 68 |
-w, --workdir="" Working directory inside the container |
| ... | ... |
@@ -21,11 +21,12 @@ weight=1 |
| 21 | 21 |
-c, --cpu-shares=0 CPU shares (relative weight) |
| 22 | 22 |
--cap-add=[] Add Linux capabilities |
| 23 | 23 |
--cap-drop=[] Drop Linux capabilities |
| 24 |
+ --cgroup-parent="" Optional parent cgroup for the container |
|
| 24 | 25 |
--cidfile="" Write the container ID to the file |
| 26 |
+ --cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period |
|
| 27 |
+ --cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota |
|
| 25 | 28 |
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) |
| 26 | 29 |
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) |
| 27 |
- --cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period |
|
| 28 |
- --cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota |
|
| 29 | 30 |
-d, --detach=false Run container in background and print container ID |
| 30 | 31 |
--device=[] Add a host device to the container |
| 31 | 32 |
--dns=[] Set custom DNS servers |
| ... | ... |
@@ -39,31 +40,32 @@ weight=1 |
| 39 | 39 |
--help=false Print usage |
| 40 | 40 |
-i, --interactive=false Keep STDIN open even if not attached |
| 41 | 41 |
--ipc="" IPC namespace to use |
| 42 |
+ -l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) |
|
| 43 |
+ --label-file=[] Read in a file of labels (EOL delimited) |
|
| 42 | 44 |
--link=[] Add link to another container |
| 43 | 45 |
--log-driver="" Logging driver for container |
| 44 | 46 |
--log-opt=[] Log driver specific options |
| 45 | 47 |
--lxc-conf=[] Add custom lxc options |
| 46 | 48 |
-m, --memory="" Memory limit |
| 47 |
- -l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) |
|
| 48 |
- --label-file=[] Read in a file of labels (EOL delimited) |
|
| 49 | 49 |
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) |
| 50 | 50 |
--memory-swap="" Total memory (memory + swap), '-1' to disable swap |
| 51 |
+ --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| 51 | 52 |
--name="" Assign a name to the container |
| 52 | 53 |
--net="bridge" Set the Network mode for the container |
| 53 | 54 |
--oom-kill-disable=false Whether to disable OOM Killer for the container or not |
| 54 | 55 |
-P, --publish-all=false Publish all exposed ports to random ports |
| 55 | 56 |
-p, --publish=[] Publish a container's port(s) to the host |
| 56 | 57 |
--pid="" PID namespace to use |
| 57 |
- --uts="" UTS namespace to use |
|
| 58 | 58 |
--privileged=false Give extended privileges to this container |
| 59 | 59 |
--read-only=false Mount the container's root filesystem as read only |
| 60 | 60 |
--restart="no" Restart policy (no, on-failure[:max-retry], always) |
| 61 | 61 |
--rm=false Automatically remove the container when it exits |
| 62 |
- --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|
| 63 | 62 |
--security-opt=[] Security Options |
| 64 | 63 |
--sig-proxy=true Proxy received signals to the process |
| 65 | 64 |
-t, --tty=false Allocate a pseudo-TTY |
| 66 | 65 |
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>]) |
| 66 |
+ --ulimit=[] Ulimit options |
|
| 67 |
+ --uts="" UTS namespace to use |
|
| 67 | 68 |
-v, --volume=[] Bind mount a volume |
| 68 | 69 |
--volumes-from=[] Mount volumes from the specified container(s) |
| 69 | 70 |
-w, --workdir="" Working directory inside the container |
| ... | ... |
@@ -12,14 +12,15 @@ docker-create - Create a new container |
| 12 | 12 |
[**-c**|**--cpu-shares**[=*0*]] |
| 13 | 13 |
[**--cap-add**[=*[]*]] |
| 14 | 14 |
[**--cap-drop**[=*[]*]] |
| 15 |
+[**--cgroup-parent**[=*CGROUP-PATH*]] |
|
| 15 | 16 |
[**--cidfile**[=*CIDFILE*]] |
| 16 | 17 |
[**--cpu-period**[=*0*]] |
| 18 |
+[**--cpu-quota**[=*0*]] |
|
| 17 | 19 |
[**--cpuset-cpus**[=*CPUSET-CPUS*]] |
| 18 | 20 |
[**--cpuset-mems**[=*CPUSET-MEMS*]] |
| 19 |
-[**--cpu-quota**[=*0*]] |
|
| 20 | 21 |
[**--device**[=*[]*]] |
| 21 |
-[**--dns-search**[=*[]*]] |
|
| 22 | 22 |
[**--dns**[=*[]*]] |
| 23 |
+[**--dns-search**[=*[]*]] |
|
| 23 | 24 |
[**-e**|**--env**[=*[]*]] |
| 24 | 25 |
[**--entrypoint**[=*ENTRYPOINT*]] |
| 25 | 26 |
[**--env-file**[=*[]*]] |
| ... | ... |
@@ -32,30 +33,30 @@ docker-create - Create a new container |
| 32 | 32 |
[**-l**|**--label**[=*[]*]] |
| 33 | 33 |
[**--label-file**[=*[]*]] |
| 34 | 34 |
[**--link**[=*[]*]] |
| 35 |
-[**--lxc-conf**[=*[]*]] |
|
| 36 | 35 |
[**--log-driver**[=*[]*]] |
| 37 | 36 |
[**--log-opt**[=*[]*]] |
| 37 |
+[**--lxc-conf**[=*[]*]] |
|
| 38 | 38 |
[**-m**|**--memory**[=*MEMORY*]] |
| 39 |
-[**--memory-swap**[=*MEMORY-SWAP*]] |
|
| 40 | 39 |
[**--mac-address**[=*MAC-ADDRESS*]] |
| 40 |
+[**--memory-swap**[=*MEMORY-SWAP*]] |
|
| 41 |
+[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] |
|
| 41 | 42 |
[**--name**[=*NAME*]] |
| 42 | 43 |
[**--net**[=*"bridge"*]] |
| 43 | 44 |
[**--oom-kill-disable**[=*false*]] |
| 44 | 45 |
[**-P**|**--publish-all**[=*false*]] |
| 45 | 46 |
[**-p**|**--publish**[=*[]*]] |
| 46 | 47 |
[**--pid**[=*[]*]] |
| 47 |
-[**--uts**[=*[]*]] |
|
| 48 | 48 |
[**--privileged**[=*false*]] |
| 49 | 49 |
[**--read-only**[=*false*]] |
| 50 | 50 |
[**--restart**[=*RESTART*]] |
| 51 | 51 |
[**--security-opt**[=*[]*]] |
| 52 |
-[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] |
|
| 53 | 52 |
[**-t**|**--tty**[=*false*]] |
| 54 | 53 |
[**-u**|**--user**[=*USER*]] |
| 54 |
+[**--ulimit**[=*[]*]] |
|
| 55 |
+[**--uts**[=*[]*]] |
|
| 55 | 56 |
[**-v**|**--volume**[=*[]*]] |
| 56 | 57 |
[**--volumes-from**[=*[]*]] |
| 57 | 58 |
[**-w**|**--workdir**[=*WORKDIR*]] |
| 58 |
-[**--cgroup-parent**[=*CGROUP-PATH*]] |
|
| 59 | 59 |
IMAGE [COMMAND] [ARG...] |
| 60 | 60 |
|
| 61 | 61 |
# DESCRIPTION |
| ... | ... |
@@ -239,6 +240,9 @@ This value should always larger than **-m**, so you should always use this with |
| 239 | 239 |
**-u**, **--user**="" |
| 240 | 240 |
Username or UID |
| 241 | 241 |
|
| 242 |
+**--ulimit**=[] |
|
| 243 |
+ Ulimit options |
|
| 244 |
+ |
|
| 242 | 245 |
**-v**, **--volume**=[] |
| 243 | 246 |
Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container) |
| 244 | 247 |
|
| ... | ... |
@@ -12,15 +12,16 @@ docker-run - Run a command in a new container |
| 12 | 12 |
[**-c**|**--cpu-shares**[=*0*]] |
| 13 | 13 |
[**--cap-add**[=*[]*]] |
| 14 | 14 |
[**--cap-drop**[=*[]*]] |
| 15 |
+[**--cgroup-parent**[=*CGROUP-PATH*]] |
|
| 15 | 16 |
[**--cidfile**[=*CIDFILE*]] |
| 16 | 17 |
[**--cpu-period**[=*0*]] |
| 18 |
+[**--cpu-quota**[=*0*]] |
|
| 17 | 19 |
[**--cpuset-cpus**[=*CPUSET-CPUS*]] |
| 18 | 20 |
[**--cpuset-mems**[=*CPUSET-MEMS*]] |
| 19 | 21 |
[**-d**|**--detach**[=*false*]] |
| 20 |
-[**--cpu-quota**[=*0*]] |
|
| 21 | 22 |
[**--device**[=*[]*]] |
| 22 |
-[**--dns-search**[=*[]*]] |
|
| 23 | 23 |
[**--dns**[=*[]*]] |
| 24 |
+[**--dns-search**[=*[]*]] |
|
| 24 | 25 |
[**-e**|**--env**[=*[]*]] |
| 25 | 26 |
[**--entrypoint**[=*ENTRYPOINT*]] |
| 26 | 27 |
[**--env-file**[=*[]*]] |
| ... | ... |
@@ -33,32 +34,32 @@ docker-run - Run a command in a new container |
| 33 | 33 |
[**-l**|**--label**[=*[]*]] |
| 34 | 34 |
[**--label-file**[=*[]*]] |
| 35 | 35 |
[**--link**[=*[]*]] |
| 36 |
-[**--lxc-conf**[=*[]*]] |
|
| 37 | 36 |
[**--log-driver**[=*[]*]] |
| 38 | 37 |
[**--log-opt**[=*[]*]] |
| 38 |
+[**--lxc-conf**[=*[]*]] |
|
| 39 | 39 |
[**-m**|**--memory**[=*MEMORY*]] |
| 40 |
-[**--memory-swap**[=*MEMORY-SWAP*]] |
|
| 41 | 40 |
[**--mac-address**[=*MAC-ADDRESS*]] |
| 41 |
+[**--memory-swap**[=*MEMORY-SWAP*]] |
|
| 42 |
+[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] |
|
| 42 | 43 |
[**--name**[=*NAME*]] |
| 43 | 44 |
[**--net**[=*"bridge"*]] |
| 44 | 45 |
[**--oom-kill-disable**[=*false*]] |
| 45 | 46 |
[**-P**|**--publish-all**[=*false*]] |
| 46 | 47 |
[**-p**|**--publish**[=*[]*]] |
| 47 | 48 |
[**--pid**[=*[]*]] |
| 48 |
-[**--uts**[=*[]*]] |
|
| 49 | 49 |
[**--privileged**[=*false*]] |
| 50 | 50 |
[**--read-only**[=*false*]] |
| 51 | 51 |
[**--restart**[=*RESTART*]] |
| 52 | 52 |
[**--rm**[=*false*]] |
| 53 | 53 |
[**--security-opt**[=*[]*]] |
| 54 | 54 |
[**--sig-proxy**[=*true*]] |
| 55 |
-[**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] |
|
| 56 | 55 |
[**-t**|**--tty**[=*false*]] |
| 57 | 56 |
[**-u**|**--user**[=*USER*]] |
| 58 | 57 |
[**-v**|**--volume**[=*[]*]] |
| 58 |
+[**--ulimit**[=*[]*]] |
|
| 59 |
+[**--uts**[=*[]*]] |
|
| 59 | 60 |
[**--volumes-from**[=*[]*]] |
| 60 | 61 |
[**-w**|**--workdir**[=*WORKDIR*]] |
| 61 |
-[**--cgroup-parent**[=*CGROUP-PATH*]] |
|
| 62 | 62 |
IMAGE [COMMAND] [ARG...] |
| 63 | 63 |
|
| 64 | 64 |
# DESCRIPTION |
| ... | ... |
@@ -397,6 +398,9 @@ standard input. |
| 397 | 397 |
|
| 398 | 398 |
Without this argument the command will be run as root in the container. |
| 399 | 399 |
|
| 400 |
+""--ulimit""=[] |
|
| 401 |
+ Ulimit options |
|
| 402 |
+ |
|
| 400 | 403 |
**-v**, **--volume**=[] |
| 401 | 404 |
Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container) |
| 402 | 405 |
|
| ... | ... |
@@ -83,9 +83,9 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe |
| 83 | 83 |
flWorkingDir = cmd.String([]string{"w", "-workdir"}, "", "Working directory inside the container")
|
| 84 | 84 |
flCpuShares = cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
| 85 | 85 |
flCpuPeriod = cmd.Int64([]string{"-cpu-period"}, 0, "Limit CPU CFS (Completely Fair Scheduler) period")
|
| 86 |
+ flCpuQuota = cmd.Int64([]string{"-cpu-quota"}, 0, "Limit CPU CFS (Completely Fair Scheduler) quota")
|
|
| 86 | 87 |
flCpusetCpus = cmd.String([]string{"#-cpuset", "-cpuset-cpus"}, "", "CPUs in which to allow execution (0-3, 0,1)")
|
| 87 | 88 |
flCpusetMems = cmd.String([]string{"-cpuset-mems"}, "", "MEMs in which to allow execution (0-3, 0,1)")
|
| 88 |
- flCpuQuota = cmd.Int64([]string{"-cpu-quota"}, 0, "Limit the CPU CFS quota")
|
|
| 89 | 89 |
flBlkioWeight = cmd.Int64([]string{"-blkio-weight"}, 0, "Block IO (relative weight), between 10 and 1000")
|
| 90 | 90 |
flNetMode = cmd.String([]string{"-net"}, "default", "Set the Network mode for the container")
|
| 91 | 91 |
flMacAddress = cmd.String([]string{"-mac-address"}, "", "Container MAC address (e.g. 92:d0:c6:0a:29:33)")
|