github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/cli/man/docker-run.1.md (about) 1 % "DOCKER" "1" "JUNE 2014" "Docker Community" "Docker User Manuals" 2 3 # NAME 4 docker-run - Run a command in a new container 5 6 # SYNOPSIS 7 **docker run** 8 [**-a**|**--attach**[=*[]*]] 9 [**--add-host**[=*[]*]] 10 [**--blkio-weight**[=*[BLKIO-WEIGHT]*]] 11 [**--blkio-weight-device**[=*[]*]] 12 [**--cpu-shares**[=*0*]] 13 [**--cap-add**[=*[]*]] 14 [**--cap-drop**[=*[]*]] 15 [**--cgroupns**[=*[]*]] 16 [**--cgroup-parent**[=*CGROUP-PATH*]] 17 [**--cidfile**[=*CIDFILE*]] 18 [**--cpu-count**[=*0*]] 19 [**--cpu-percent**[=*0*]] 20 [**--cpu-period**[=*0*]] 21 [**--cpu-quota**[=*0*]] 22 [**--cpu-rt-period**[=*0*]] 23 [**--cpu-rt-runtime**[=*0*]] 24 [**--cpus**[=*0.0*]] 25 [**--cpuset-cpus**[=*CPUSET-CPUS*]] 26 [**--cpuset-mems**[=*CPUSET-MEMS*]] 27 [**-d**|**--detach**] 28 [**--detach-keys**[=*[]*]] 29 [**--device**[=*[]*]] 30 [**--device-cgroup-rule**[=*[]*]] 31 [**--device-read-bps**[=*[]*]] 32 [**--device-read-iops**[=*[]*]] 33 [**--device-write-bps**[=*[]*]] 34 [**--device-write-iops**[=*[]*]] 35 [**--dns**[=*[]*]] 36 [**--dns-option**[=*[]*]] 37 [**--dns-search**[=*[]*]] 38 [**--domainname**[=*DOMAINNAME*]] 39 [**-e**|**--env**[=*[]*]] 40 [**--entrypoint**[=*ENTRYPOINT*]] 41 [**--env-file**[=*[]*]] 42 [**--expose**[=*[]*]] 43 [**--group-add**[=*[]*]] 44 [**-h**|**--hostname**[=*HOSTNAME*]] 45 [**--help**] 46 [**--init**] 47 [**-i**|**--interactive**] 48 [**--ip**[=*IPv4-ADDRESS*]] 49 [**--ip6**[=*IPv6-ADDRESS*]] 50 [**--ipc**[=*IPC*]] 51 [**--isolation**[=*default*]] 52 [**--kernel-memory**[=*KERNEL-MEMORY*]] 53 [**-l**|**--label**[=*[]*]] 54 [**--label-file**[=*[]*]] 55 [**--link**[=*[]*]] 56 [**--link-local-ip**[=*[]*]] 57 [**--log-driver**[=*[]*]] 58 [**--log-opt**[=*[]*]] 59 [**-m**|**--memory**[=*MEMORY*]] 60 [**--mac-address**[=*MAC-ADDRESS*]] 61 [**--memory-reservation**[=*MEMORY-RESERVATION*]] 62 [**--memory-swap**[=*LIMIT*]] 63 [**--memory-swappiness**[=*MEMORY-SWAPPINESS*]] 64 [**--mount**[=*[MOUNT]*]] 65 [**--name**[=*NAME*]] 66 [**--network-alias**[=*[]*]] 67 [**--network**[=*"bridge"*]] 68 [**--oom-kill-disable**] 69 [**--oom-score-adj**[=*0*]] 70 [**-P**|**--publish-all**] 71 [**-p**|**--publish**[=*[]*]] 72 [**--pid**[=*[PID]*]] 73 [**--userns**[=*[]*]] 74 [**--pids-limit**[=*PIDS_LIMIT*]] 75 [**--privileged**] 76 [**--read-only**] 77 [**--restart**[=*RESTART*]] 78 [**--rm**] 79 [**--security-opt**[=*[]*]] 80 [**--storage-opt**[=*[]*]] 81 [**--stop-signal**[=*SIGNAL*]] 82 [**--stop-timeout**[=*TIMEOUT*]] 83 [**--shm-size**[=*[]*]] 84 [**--sig-proxy**[=*true*]] 85 [**--sysctl**[=*[]*]] 86 [**-t**|**--tty**] 87 [**--tmpfs**[=*[CONTAINER-DIR[:OPTIONS]*]] 88 [**-u**|**--user**[=*USER*]] 89 [**--ulimit**[=*[]*]] 90 [**--uts**[=*[]*]] 91 [**-v**|**--volume**[=*[[HOST-DIR:]CONTAINER-DIR[:OPTIONS]]*]] 92 [**--volume-driver**[=*DRIVER*]] 93 [**--volumes-from**[=*[]*]] 94 [**-w**|**--workdir**[=*WORKDIR*]] 95 IMAGE [COMMAND] [ARG...] 96 97 # DESCRIPTION 98 99 Run a process in a new container. **docker run** starts a process with its own 100 file system, its own networking, and its own isolated process tree. The IMAGE 101 which starts the process may define defaults related to the process that will be 102 run in the container, the networking to expose, and more, but **docker run** 103 gives final control to the operator or administrator who starts the container 104 from the image. For that reason **docker run** has more options than any other 105 Docker command. 106 107 If the IMAGE is not already loaded then **docker run** will pull the IMAGE, and 108 all image dependencies, from the repository in the same way running **docker 109 pull** IMAGE, before it starts the container from that image. 110 111 # OPTIONS 112 **-a**, **--attach**=[] 113 Attach to STDIN, STDOUT or STDERR. 114 115 In foreground mode (the default when **-d** 116 is not specified), **docker run** can start the process in the container 117 and attach the console to the process's standard input, output, and standard 118 error. It can even pretend to be a TTY (this is what most commandline 119 executables expect) and pass along signals. The **-a** option can be set for 120 each of stdin, stdout, and stderr. 121 122 **--add-host**=[] 123 Add a custom host-to-IP mapping (host:ip) 124 125 Add a line to /etc/hosts. The format is hostname:ip. The **--add-host** 126 option can be set multiple times. 127 128 **--blkio-weight**=*0* 129 Block IO weight (relative weight) accepts a weight value between 10 and 1000. 130 131 **--blkio-weight-device**=[] 132 Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`). 133 134 **--cpu-shares**=*0* 135 CPU shares (relative weight) 136 137 By default, all containers get the same proportion of CPU cycles. This proportion 138 can be modified by changing the container's CPU share weighting relative 139 to the weighting of all other running containers. 140 141 To modify the proportion from the default of 1024, use the **--cpu-shares** 142 flag to set the weighting to 2 or higher. 143 144 The proportion will only apply when CPU-intensive processes are running. 145 When tasks in one container are idle, other containers can use the 146 left-over CPU time. The actual amount of CPU time will vary depending on 147 the number of containers running on the system. 148 149 For example, consider three containers, one has a cpu-share of 1024 and 150 two others have a cpu-share setting of 512. When processes in all three 151 containers attempt to use 100% of CPU, the first container would receive 152 50% of the total CPU time. If you add a fourth container with a cpu-share 153 of 1024, the first container only gets 33% of the CPU. The remaining containers 154 receive 16.5%, 16.5% and 33% of the CPU. 155 156 On a multi-core system, the shares of CPU time are distributed over all CPU 157 cores. Even if a container is limited to less than 100% of CPU time, it can 158 use 100% of each individual CPU core. 159 160 For example, consider a system with more than three cores. If you start one 161 container **{C0}** with **-c=512** running one process, and another container 162 **{C1}** with **-c=1024** running two processes, this can result in the following 163 division of CPU shares: 164 165 PID container CPU CPU share 166 100 {C0} 0 100% of CPU0 167 101 {C1} 1 100% of CPU1 168 102 {C1} 2 100% of CPU2 169 170 **--cap-add**=[] 171 Add Linux capabilities 172 173 **--cap-drop**=[] 174 Drop Linux capabilities 175 176 **--cgroupns**="" 177 Set the cgroup namespace mode for the container. 178 **host**: run the container in the host's cgroup namespace 179 **private**: run the container in its own private cgroup namespace 180 **""**: (unset) use the daemon's default configuration (**host** on cgroup v1, **private** on cgroup v2) 181 182 **--cgroup-parent**="" 183 Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist. 184 185 **--cidfile**="" 186 Write the container ID to the file 187 188 **--cpu-count**=*0* 189 Limit the number of CPUs available for execution by the container. 190 191 On Windows Server containers, this is approximated as a percentage of total CPU usage. 192 193 On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. 194 195 **--cpu-percent**=*0* 196 Limit the percentage of CPU available for execution by a container running on a Windows daemon. 197 198 On Windows Server containers, the processor resource controls are mutually exclusive, the order of precedence is CPUCount first, then CPUShares, and CPUPercent last. 199 200 **--cpu-period**=*0* 201 Limit the CPU CFS (Completely Fair Scheduler) period 202 203 Limit the container's CPU usage. This flag tell the kernel to restrict the container's CPU usage to the period you specify. 204 205 **--cpuset-cpus**="" 206 CPUs in which to allow execution (0-3, 0,1) 207 208 **--cpuset-mems**="" 209 Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. 210 211 If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1` 212 then processes in your Docker container will only use memory from the first 213 two memory nodes. 214 215 **--cpu-quota**=*0* 216 Limit the CPU CFS (Completely Fair Scheduler) quota 217 218 Limit the container's CPU usage. By default, containers run with the full 219 CPU resource. This flag tell the kernel to restrict the container's CPU usage 220 to the quota you specify. 221 222 **--cpu-rt-period**=0 223 Limit the CPU real-time period in microseconds 224 225 Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify. 226 227 **--cpu-rt-runtime**=0 228 Limit the CPU real-time runtime in microseconds 229 230 Limit the containers Real Time CPU usage. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex: 231 Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks. 232 233 The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup. 234 235 **--cpus**=0.0 236 Number of CPUs. The default is *0.0* which means no limit. 237 238 **-d**, **--detach**=*true*|*false* 239 Detached mode: run the container in the background and print the new container ID. The default is *false*. 240 241 At any time you can run **docker ps** in 242 the other shell to view a list of the running containers. You can reattach to a 243 detached container with **docker attach**. 244 245 When attached in the tty mode, you can detach from the container (and leave it 246 running) using a configurable key sequence. The default sequence is `CTRL-p CTRL-q`. 247 You configure the key sequence using the **--detach-keys** option or a configuration file. 248 See **config-json(5)** for documentation on using a configuration file. 249 250 **--detach-keys**=*key* 251 Override the key sequence for detaching a container; *key* is a single character from the [a-Z] range, or **ctrl**-*value*, where *value* is one of: **a-z**, **@**, **^**, **[**, **,**, or **_**. 252 253 **--device**=*onhost*:*incontainer*[:*mode*] 254 Add a host device *onhost* to the container under the *incontainer* name. 255 Optional *mode* parameter can be used to specify device permissions, it is 256 a combination of **r** (for read), **w** (for write), and **m** (for **mknod**(2)). 257 258 For example, **--device=/dev/sdc:/dev/xvdc:rwm** will give a container all 259 permissions for the host device **/dev/sdc**, seen as **/dev/xvdc** inside the container. 260 261 **--device-cgroup-rule**="*type* *major*:*minor* *mode*" 262 Add a rule to the cgroup allowed devices list. The rule is expected to be in the format specified in the Linux kernel documentation (Documentation/cgroup-v1/devices.txt): 263 - *type*: **a** (all), **c** (char), or **b** (block); 264 - *major* and *minor*: either a number, or __*__ for all; 265 - *mode*: a composition of **r** (read), **w** (write), and **m** (**mknod**(2)). 266 267 Example: **--device-cgroup-rule "c 1:3 mr"**: allow for a character device idendified by **1:3** to be created and read. 268 269 **--device-read-bps**=[] 270 Limit read rate from a device (e.g. --device-read-bps=/dev/sda:1mb) 271 272 **--device-read-iops**=[] 273 Limit read rate from a device (e.g. --device-read-iops=/dev/sda:1000) 274 275 **--device-write-bps**=[] 276 Limit write rate to a device (e.g. --device-write-bps=/dev/sda:1mb) 277 278 **--device-write-iops**=[] 279 Limit write rate to a device (e.g. --device-write-iops=/dev/sda:1000) 280 281 **--dns-search**=[] 282 Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain) 283 284 **--dns-option**=[] 285 Set custom DNS options 286 287 **--dns**=[] 288 Set custom DNS servers 289 290 This option can be used to override the DNS 291 configuration passed to the container. Typically this is necessary when the 292 host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this 293 is the case the **--dns** flags is necessary for every run. 294 295 **--domainname**="" 296 Container NIS domain name 297 298 Sets the container's NIS domain name (see also **setdomainname(2)**) that is 299 available inside the container. 300 301 **-e**, **--env**=[] 302 Set environment variables 303 304 This option allows you to specify arbitrary 305 environment variables that are available for the process that will be launched 306 inside of the container. 307 308 **--entrypoint**="" 309 Overwrite the default ENTRYPOINT of the image 310 311 This option allows you to overwrite the default entrypoint of the image that 312 is set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND 313 because it specifies what executable to run when the container starts, but it is 314 (purposely) more difficult to override. The ENTRYPOINT gives a container its 315 default nature or behavior, so that when you set an ENTRYPOINT you can run the 316 container as if it were that binary, complete with default options, and you can 317 pass in more options via the COMMAND. But, sometimes an operator may want to run 318 something else inside the container, so you can override the default ENTRYPOINT 319 at runtime by using a **--entrypoint** and a string to specify the new 320 ENTRYPOINT. 321 322 **--env-file**=[] 323 Read in a line delimited file of environment variables 324 325 **--expose**=[] 326 Expose a port, or a range of ports (e.g. --expose=3300-3310) informs Docker 327 that the container listens on the specified network ports at runtime. Docker 328 uses this information to interconnect containers using links and to set up port 329 redirection on the host system. 330 331 **--group-add**=[] 332 Add additional groups to run as 333 334 **-h**, **--hostname**="" 335 Container host name 336 337 Sets the container host name that is available inside the container. 338 339 **--help** 340 Print usage statement 341 342 **--init** 343 Run an init inside the container that forwards signals and reaps processes 344 345 **-i**, **--interactive**=*true*|*false* 346 Keep STDIN open even if not attached. The default is *false*. 347 348 When set to true, keep stdin open even if not attached. 349 350 **--ip**="" 351 Sets the container's interface IPv4 address (e.g., 172.23.0.9) 352 353 It can only be used in conjunction with **--network** for user-defined networks 354 355 **--ip6**="" 356 Sets the container's interface IPv6 address (e.g., 2001:db8::1b99) 357 358 It can only be used in conjunction with **--network** for user-defined networks 359 360 **--ipc**="" 361 Sets the IPC mode for the container. The following values are accepted: 362 363 | Value | Description | 364 |:---------------------------|:----------------------------------------------------------------------------------| 365 | (empty) | Use daemon's default. | 366 | **none** | Own private IPC namespace, with /dev/shm not mounted. | 367 | **private** | Own private IPC namespace. | 368 | **shareable** | Own private IPC namespace, with a possibility to share it with other containers. | 369 | **container:**_name-or-ID_ | Join another ("shareable") container's IPC namespace. | 370 | **host** | Use the host system's IPC namespace. | 371 372 If not specified, daemon default is used, which can either be **private** 373 or **shareable**, depending on the daemon version and configuration. 374 375 **--isolation**="*default*" 376 Isolation specifies the type of isolation technology used by containers. Note 377 that the default on Windows server is `process`, and the default on Windows client 378 is `hyperv`. Linux only supports `default`. 379 380 **-l**, **--label** *key*=*value* 381 Set metadata on the container (for example, **--label com.example.key=value**). 382 383 **--kernel-memory**=*number*[*S*] 384 Kernel memory limit; *S* is an optional suffix which can be one of **b**, **k**, **m**, or **g**. 385 386 Constrains the kernel memory available to a container. If a limit of 0 387 is specified (not using **--kernel-memory**), the container's kernel memory 388 is not limited. If you specify a limit, it may be rounded up to a multiple 389 of the operating system's page size and the value can be very large, 390 millions of trillions. 391 392 **--label-file**=[] 393 Read in a line delimited file of labels 394 395 **--link**=*name-or-id*[:*alias*] 396 Add link to another container. 397 398 If the operator 399 uses **--link** when starting the new client container, then the client 400 container can access the exposed port via a private networking interface. Docker 401 will set some environment variables in the client container to help indicate 402 which interface and port to use. 403 404 **--link-local-ip**=[] 405 Add one or more link-local IPv4/IPv6 addresses to the container's interface 406 407 **--log-driver**="*json-file*|*syslog*|*journald*|*gelf*|*fluentd*|*awslogs*|*splunk*|*etwlogs*|*gcplogs*|*none*" 408 Logging driver for the container. Default is defined by daemon **--log-driver** flag. 409 **Warning**: the `docker logs` command works only for the `json-file` and 410 `journald` logging drivers. 411 412 **--log-opt**=[] 413 Logging driver specific options. 414 415 **-m**, **--memory**=*number*[*S] 416 Memory limit; *S* is an optional suffix which can be one of **b**, **k**, **m**, or **g**. 417 418 Allows you to constrain the memory available to a container. If the host 419 supports swap memory, then the **-m** memory setting can be larger than physical 420 RAM. If a limit of 0 is specified (not using **-m**), the container's memory is 421 not limited. The actual limit may be rounded up to a multiple of the operating 422 system's page size (the value would be very large, that's millions of trillions). 423 424 **--memory-reservation**=*number*[*S] 425 Memory soft limit; *S* is an optional suffix which can be one of **b**, **k**, **m**, or **g**. 426 427 After setting memory reservation, when the system detects memory contention 428 or low memory, containers are forced to restrict their consumption to their 429 reservation. So you should always set the value below **--memory**, otherwise the 430 hard limit will take precedence. By default, memory reservation will be the same 431 as memory limit. 432 433 **--memory-swap**=*number*[*S*] 434 Combined memory plus swap limit; *S* is an optional suffix which can be one of **b**, **k**, **m**, or **g**. 435 436 This option can only be used together with **--memory**. The argument should always be larger than that of **--memory**. Default is double the value of **--memory**. Set to **-1** to enable unlimited swap. 437 438 **--mac-address**="" 439 Container MAC address (e.g., **92:d0:c6:0a:29:33**) 440 441 Remember that the MAC address in an Ethernet network must be unique. 442 The IPv6 link-local address will be based on the device's MAC address 443 according to RFC4862. 444 445 **--mount** **type=**_TYPE_,*TYPE-SPECIFIC-OPTION*[,...] 446 Attach a filesystem mount to the container 447 448 Current supported mount `TYPES` are `bind`, `volume`, and `tmpfs`. 449 450 e.g. 451 452 `type=bind,source=/path/on/host,destination=/path/in/container` 453 454 `type=volume,source=my-volume,destination=/path/in/container,volume-label="color=red",volume-label="shape=round"` 455 456 `type=tmpfs,tmpfs-size=512M,destination=/path/in/container` 457 458 Common Options: 459 460 * `src`, `source`: mount source spec for `bind` and `volume`. Mandatory for `bind`. 461 * `dst`, `destination`, `target`: mount destination spec. 462 * `ro`, `readonly`: `true` or `false` (default). 463 464 **Note**: setting `readonly` for a bind mount does not make its submounts 465 read-only on the current Linux implementation. See also `bind-nonrecursive`. 466 467 Options specific to `bind`: 468 469 * `bind-propagation`: `shared`, `slave`, `private`, `rshared`, `rslave`, or `rprivate`(default). See also `mount(2)`. 470 * `consistency`: `consistent`(default), `cached`, or `delegated`. Currently, only effective for Docker for Mac. 471 * `bind-nonrecursive`: `true` or `false` (default). If set to `true`, 472 submounts are not recursively bind-mounted. This option is useful for 473 `readonly` bind mount. 474 475 Options specific to `volume`: 476 477 * `volume-driver`: Name of the volume-driver plugin. 478 * `volume-label`: Custom metadata. 479 * `volume-nocopy`: `true`(default) or `false`. If set to `false`, the Engine copies existing files and directories under the mount-path into the volume, allowing the host to access them. 480 * `volume-opt`: specific to a given volume driver. 481 482 Options specific to `tmpfs`: 483 484 * `tmpfs-size`: Size of the tmpfs mount in bytes. Unlimited by default in Linux. 485 * `tmpfs-mode`: File mode of the tmpfs in octal. (e.g. `700` or `0700`.) Defaults to `1777` in Linux. 486 487 **--name**="" 488 Assign a name to the container 489 490 The operator can identify a container in three ways: 491 492 | Identifier type | Example value | 493 |:----------------------|:-------------------------------------------------------------------| 494 | UUID long identifier | "f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778" | 495 | UUID short identifier | "f78375b1c487" | 496 | Name | "evil_ptolemy" | 497 498 The UUID identifiers come from the Docker daemon, and if a name is not assigned 499 to the container with **--name** then the daemon will also generate a random 500 string name. The name is useful when defining links (see **--link**) (or any 501 other place you need to identify a container). This works for both background 502 and foreground Docker containers. 503 504 **--network**=*type* 505 Set the Network mode for the container. Supported values are: 506 507 | Value | Description | 508 |:-----------------------------|:-----------------------------------------------------------------------------------------| 509 | **none** | No networking in the container. | 510 | **bridge** | Connect the container to the default Docker bridge via veth interfaces. | 511 | **host** | Use the host's network stack inside the container. | 512 | **container:**_name_\|_id_ | Use the network stack of another container, specified via its _name_ or _id_. | 513 | _network-name_\|_network-id_ | Connects the container to a user created network (using `docker network create` command) | 514 515 Default is **bridge**. 516 517 **--network-alias**=[] 518 Add network-scoped alias for the container 519 520 **--oom-kill-disable**=*true*|*false* 521 Whether to disable OOM Killer for the container or not. 522 523 **--oom-score-adj**="" 524 Tune the host's OOM preferences for containers (accepts -1000 to 1000) 525 526 **-P**, **--publish-all**=*true*|*false* 527 Publish all exposed ports to random ports on the host interfaces. The default is *false*. 528 529 When set to true publish all exposed ports to the host interfaces. The 530 default is false. If the operator uses -P (or -p) then Docker will make the 531 exposed port accessible on the host and the ports will be available to any 532 client that can reach the host. When using -P, Docker will bind any exposed 533 port to a random port on the host within an *ephemeral port range* defined by 534 `/proc/sys/net/ipv4/ip_local_port_range`. To find the mapping between the host 535 ports and the exposed ports, use `docker port`(1). 536 537 **-p**, **--publish** *ip*:[*hostPort*]:*containerPort* | [*hostPort*:]*containerPort* 538 Publish a container's port, or range of ports, to the host. 539 540 Both *hostPort* and *containerPort* can be specified as a range. 541 When specifying ranges for both, the number of ports in ranges should be equal. 542 543 Examples: **-p 1234-1236:1222-1224**, **-p 127.0.0.1:$HOSTPORT:$CONTAINERPORT**. 544 545 Use `docker port`(1) to see the actual mapping, e.g. `docker port CONTAINER $CONTAINERPORT`. 546 547 **--pid**="" 548 Set the PID mode for the container 549 Default is to create a private PID namespace for the container 550 'container:<name|id>': join another container's PID namespace 551 'host': use the host's PID namespace for the container. Note: the host mode gives the container full access to local PID and is therefore considered insecure. 552 553 **--userns**="" 554 Set the usernamespace mode for the container when `userns-remap` option is enabled. 555 **host**: use the host usernamespace and enable all privileged options (e.g., `pid=host` or `--privileged`). 556 557 **--pids-limit**="" 558 Tune the container's pids (process IDs) limit. Set to `-1` to have unlimited pids for the container. 559 560 **--uts**=*type* 561 Set the UTS mode for the container. The only possible *type* is **host**, meaning to 562 use the host's UTS namespace inside the container. 563 Note: the host mode gives the container access to changing the host's hostname and is therefore considered insecure. 564 565 **--privileged** [**true**|**false**] 566 Give extended privileges to this container. A "privileged" container is given access to all devices. 567 568 When the operator executes **docker run --privileged**, Docker will enable access 569 to all devices on the host as well as set some configuration in AppArmor to 570 allow the container nearly all the same access to the host as processes running 571 outside of a container on the host. 572 573 **--read-only**=**true**|**false** 574 Mount the container's root filesystem as read only. 575 576 By default a container will have its root filesystem writable allowing processes 577 to write files anywhere. By specifying the `--read-only` flag the container will have 578 its root filesystem mounted as read only prohibiting any writes. 579 580 **--restart** *policy* 581 Restart policy to apply when a container exits. Supported values are: 582 583 | Policy | Result | 584 |:-------------------------------|:----------------------| 585 | **no** | Do not automatically restart the container when it exits. | 586 | **on-failure**[:_max-retries_] | Restart only if the container exits with a non-zero exit status. Optionally, limit the number of restart retries the Docker daemon attempts. | 587 | **always** | Always restart the container regardless of the exit status. When you specify always, the Docker daemon will try to restart the container indefinitely. The container will also always start on daemon startup, regardless of the current state of the container. | 588 | **unless-stopped** | Always restart the container regardless of the exit status, but do not start it on daemon startup if the container has been put to a stopped state before. | 589 590 Default is **no**. 591 592 **--rm** **true**|**false** 593 Automatically remove the container when it exits. The default is **false**. 594 `--rm` flag can work together with `-d`, and auto-removal will be done on daemon side. Note that it's 595 incompatible with any restart policy other than `none`. 596 597 **--security-opt** *value*[,...] 598 Security Options for the container. The following options can be given: 599 600 "label=user:USER" : Set the label user for the container 601 "label=role:ROLE" : Set the label role for the container 602 "label=type:TYPE" : Set the label type for the container 603 "label=level:LEVEL" : Set the label level for the container 604 "label=disable" : Turn off label confinement for the container 605 "no-new-privileges" : Disable container processes from gaining additional privileges 606 607 "seccomp=unconfined" : Turn off seccomp confinement for the container 608 "seccomp=profile.json : White listed syscalls seccomp Json file to be used as a seccomp filter 609 610 "apparmor=unconfined" : Turn off apparmor confinement for the container 611 "apparmor=your-profile" : Set the apparmor confinement profile for the container 612 613 **--storage-opt** 614 Storage driver options per container 615 616 $ docker run -it --storage-opt size=120G fedora /bin/bash 617 618 This (size) will allow to set the container rootfs size to 120G at creation time. 619 This option is only available for the `devicemapper`, `btrfs`, `overlay2` and `zfs` graph drivers. 620 For the `devicemapper`, `btrfs` and `zfs` storage drivers, user cannot pass a size less than the Default BaseFS Size. 621 For the `overlay2` storage driver, the size option is only available if the backing fs is `xfs` and mounted with the `pquota` mount option. 622 Under these conditions, user can pass any size less than the backing fs size. 623 624 **--stop-signal**=*SIGTERM* 625 Signal to stop the container. Default is SIGTERM. 626 627 The `--stop-signal` flag sets the system call signal that will be sent to the 628 container to exit. This signal can be a signal name in the format `SIG<NAME>`, 629 for instance `SIGKILL`, or an unsigned number that matches a position in the 630 kernel's syscall table, for instance `9`. 631 632 **--stop-timeout** 633 Timeout (in seconds) to stop a container, or **-1** to disable timeout. 634 635 The `--stop-timeout` flag sets the number of seconds to wait for the container 636 to stop after sending the pre-defined (see `--stop-signal`) system call signal. 637 If the container does not exit after the timeout elapses, it is forcibly killed 638 with a `SIGKILL` signal. 639 640 If `--stop-timeout` is set to **-1**, no timeout is applied, and the daemon will 641 wait indefinitely for the container to exit. 642 643 The default is determined by the daemon, and 10 seconds for Linux containers, 644 and 30 seconds for Windows containers. 645 646 **--shm-size**="" 647 Size of `/dev/shm`. The format is `<number><unit>`. 648 `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m`(megabytes), or `g` (gigabytes). 649 If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. 650 651 **--sysctl**=SYSCTL 652 Configure namespaced kernel parameters at runtime 653 654 IPC Namespace - current sysctls allowed: 655 656 kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced 657 Sysctls beginning with fs.mqueue.* 658 659 If you use the `--ipc=host` option these sysctls will not be allowed. 660 661 Network Namespace - current sysctls allowed: 662 Sysctls beginning with net.* 663 664 If you use the `--network=host` option these sysctls will not be allowed. 665 666 **--sig-proxy**=*true*|*false* 667 Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*. 668 669 **--memory-swappiness**="" 670 Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. 671 672 **-t**, **--tty**=*true*|*false* 673 Allocate a pseudo-TTY. The default is *false*. 674 675 When set to true Docker can allocate a pseudo-tty and attach to the standard 676 input of any container. This can be used, for example, to run a throwaway 677 interactive shell. The default is false. 678 679 The **-t** option is incompatible with a redirection of the docker client 680 standard input. 681 682 **--tmpfs**=[] Create a tmpfs mount 683 684 Mount a temporary filesystem (`tmpfs`) mount into a container, for example: 685 686 $ docker run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image 687 688 This command mounts a `tmpfs` at `/tmp` within the container. The supported mount 689 options are the same as the Linux default `mount` flags. If you do not specify 690 any options, the systems uses the following options: 691 `rw,noexec,nosuid,nodev,size=65536k`. 692 693 See also `--mount`, which is the successor of `--tmpfs` and `--volume`. 694 Even though there is no plan to deprecate `--tmpfs`, usage of `--mount` is recommended. 695 696 **-u**, **--user**="" 697 Sets the username or UID used and optionally the groupname or GID for the specified command. 698 699 The followings examples are all valid: 700 --user [user | user:group | uid | uid:gid | user:gid | uid:group ] 701 702 Without this argument the command will be run as root in the container. 703 704 **--ulimit**=[] 705 Ulimit options 706 707 **-v**|**--volume**[=*[[HOST-DIR:]CONTAINER-DIR[:OPTIONS]]*] 708 Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, Docker 709 bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the Docker 710 container. If 'HOST-DIR' is omitted, Docker automatically creates the new 711 volume on the host. The `OPTIONS` are a comma delimited list and can be: 712 713 * [rw|ro] 714 * [z|Z] 715 * [`[r]shared`|`[r]slave`|`[r]private`] 716 * [`delegated`|`cached`|`consistent`] 717 * [nocopy] 718 719 The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR` 720 can be an absolute path or a `name` value. A `name` value must start with an 721 alphanumeric character, followed by `a-z0-9`, `_` (underscore), `.` (period) or 722 `-` (hyphen). An absolute path starts with a `/` (forward slash). 723 724 If you supply a `HOST-DIR` that is an absolute path, Docker bind-mounts to the 725 path you specify. If you supply a `name`, Docker creates a named volume by that 726 `name`. For example, you can specify either `/foo` or `foo` for a `HOST-DIR` 727 value. If you supply the `/foo` value, Docker creates a bind mount. If you 728 supply the `foo` specification, Docker creates a named volume. 729 730 You can specify multiple **-v** options to mount one or more mounts to a 731 container. To use these same mounts in other containers, specify the 732 **--volumes-from** option also. 733 734 You can supply additional options for each bind mount following an additional 735 colon. A `:ro` or `:rw` suffix mounts a volume in read-only or read-write 736 mode, respectively. By default, volumes are mounted in read-write mode. 737 You can also specify the consistency requirement for the mount, either 738 `:consistent` (the default), `:cached`, or `:delegated`. Multiple options are 739 separated by commas, e.g. `:ro,cached`. 740 741 Labeling systems like SELinux require that proper labels are placed on volume 742 content mounted into a container. Without a label, the security system might 743 prevent the processes running inside the container from using the content. By 744 default, Docker does not change the labels set by the OS. 745 746 To change a label in the container context, you can add either of two suffixes 747 `:z` or `:Z` to the volume mount. These suffixes tell Docker to relabel file 748 objects on the shared volumes. The `z` option tells Docker that two containers 749 share the volume content. As a result, Docker labels the content with a shared 750 content label. Shared volume labels allow all containers to read/write content. 751 The `Z` option tells Docker to label the content with a private unshared label. 752 Only the current container can use a private volume. 753 754 By default bind mounted volumes are `private`. That means any mounts done 755 inside container will not be visible on host and vice-a-versa. One can change 756 this behavior by specifying a volume mount propagation property. Making a 757 volume `shared` mounts done under that volume inside container will be 758 visible on host and vice-a-versa. Making a volume `slave` enables only one 759 way mount propagation and that is mounts done on host under that volume 760 will be visible inside container but not the other way around. 761 762 To control mount propagation property of volume one can use `:[r]shared`, 763 `:[r]slave` or `:[r]private` propagation flag. Propagation property can 764 be specified only for bind mounted volumes and not for internal volumes or 765 named volumes. For mount propagation to work source mount point (mount point 766 where source dir is mounted on) has to have right propagation properties. For 767 shared volumes, source mount point has to be shared. And for slave volumes, 768 source mount has to be either shared or slave. 769 770 Use `df <source-dir>` to figure out the source mount and then use 771 `findmnt -o TARGET,PROPAGATION <source-mount-dir>` to figure out propagation 772 properties of source mount. If `findmnt` utility is not available, then one 773 can look at mount entry for source mount point in `/proc/self/mountinfo`. Look 774 at `optional fields` and see if any propagation properties are specified. 775 `shared:X` means mount is `shared`, `master:X` means mount is `slave` and if 776 nothing is there that means mount is `private`. 777 778 To change propagation properties of a mount point use `mount` command. For 779 example, if one wants to bind mount source directory `/foo` one can do 780 `mount --bind /foo /foo` and `mount --make-private --make-shared /foo`. This 781 will convert /foo into a `shared` mount point. Alternatively one can directly 782 change propagation properties of source mount. Say `/` is source mount for 783 `/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount. 784 785 > **Note**: 786 > When using systemd to manage the Docker daemon's start and stop, in the systemd 787 > unit file there is an option to control mount propagation for the Docker daemon 788 > itself, called `MountFlags`. The value of this setting may cause Docker to not 789 > see mount propagation changes made on the mount point. For example, if this value 790 > is `slave`, you may not be able to use the `shared` or `rshared` propagation on 791 > a volume. 792 793 To disable automatic copying of data from the container path to the volume, use 794 the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes. 795 796 See also `--mount`, which is the successor of `--tmpfs` and `--volume`. 797 Even though there is no plan to deprecate `--volume`, usage of `--mount` is recommended. 798 799 **--volume-driver**="" 800 Container's volume driver. This driver creates volumes specified either from 801 a Dockerfile's `VOLUME` instruction or from the `docker run -v` flag. 802 See **docker-volume-create(1)** for full details. 803 804 **--volumes-from**=[] 805 Mount volumes from the specified container(s) 806 807 Mounts already mounted volumes from a source container onto another 808 container. You must supply the source's container-id. To share 809 a volume, use the **--volumes-from** option when running 810 the target container. You can share volumes even if the source container 811 is not running. 812 813 By default, Docker mounts the volumes in the same mode (read-write or 814 read-only) as it is mounted in the source container. Optionally, you 815 can change this by suffixing the container-id with either the `:ro` or 816 `:rw ` keyword. 817 818 If the location of the volume from the source container overlaps with 819 data residing on a target container, then the volume hides 820 that data on the target. 821 822 **-w**, **--workdir**="" 823 Working directory inside the container 824 825 The default working directory for 826 running binaries within a container is the root directory (/). The developer can 827 set a different default with the Dockerfile WORKDIR instruction. The operator 828 can override the working directory by using the **-w** option. 829 830 # Exit Status 831 832 The exit code from `docker run` gives information about why the container 833 failed to run or why it exited. When `docker run` exits with a non-zero code, 834 the exit codes follow the `chroot` standard, see below: 835 836 **_125_** if the error is with Docker daemon **_itself_** 837 838 $ docker run --foo busybox; echo $? 839 # flag provided but not defined: --foo 840 See 'docker run --help'. 841 125 842 843 **_126_** if the **_contained command_** cannot be invoked 844 845 $ docker run busybox /etc; echo $? 846 # exec: "/etc": permission denied 847 docker: Error response from daemon: Contained command could not be invoked 848 126 849 850 **_127_** if the **_contained command_** cannot be found 851 852 $ docker run busybox foo; echo $? 853 # exec: "foo": executable file not found in $PATH 854 docker: Error response from daemon: Contained command not found or does not exist 855 127 856 857 **_Exit code_** of **_contained command_** otherwise 858 859 $ docker run busybox /bin/sh -c 'exit 3' 860 # 3 861 862 # EXAMPLES 863 864 ## Running container in read-only mode 865 866 During container image development, containers often need to write to the image 867 content. Installing packages into /usr, for example. In production, 868 applications seldom need to write to the image. Container applications write 869 to volumes if they need to write to file systems at all. Applications can be 870 made more secure by running them in read-only mode using the --read-only switch. 871 This protects the containers image from modification. Read only containers may 872 still need to write temporary data. The best way to handle this is to mount 873 tmpfs directories on /run and /tmp. 874 875 # docker run --read-only --tmpfs /run --tmpfs /tmp -i -t fedora /bin/bash 876 877 ## Exposing log messages from the container to the host's log 878 879 If you want messages that are logged in your container to show up in the host's 880 syslog/journal then you should bind mount the /dev/log directory as follows. 881 882 # docker run -v /dev/log:/dev/log -i -t fedora /bin/bash 883 884 From inside the container you can test this by sending a message to the log. 885 886 (bash)# logger "Hello from my container" 887 888 Then exit and check the journal. 889 890 # exit 891 892 # journalctl -b | grep Hello 893 894 This should list the message sent to logger. 895 896 ## Attaching to one or more from STDIN, STDOUT, STDERR 897 898 If you do not specify -a then Docker will attach everything (stdin,stdout,stderr) 899 . You can specify to which of the three standard streams (stdin, stdout, stderr) 900 you'd like to connect instead, as in: 901 902 # docker run -a stdin -a stdout -i -t fedora /bin/bash 903 904 ## Sharing IPC between containers 905 906 Using shm_server.c available here: https://www.cs.cf.ac.uk/Dave/C/node27.html 907 908 Testing `--ipc=host` mode: 909 910 Host shows a shared memory segment with 7 pids attached, happens to be from httpd: 911 912 ``` 913 $ sudo ipcs -m 914 915 ------ Shared Memory Segments -------- 916 key shmid owner perms bytes nattch status 917 0x01128e25 0 root 600 1000 7 918 ``` 919 920 Now run a regular container, and it correctly does NOT see the shared memory segment from the host: 921 922 ``` 923 $ docker run -it shm ipcs -m 924 925 ------ Shared Memory Segments -------- 926 key shmid owner perms bytes nattch status 927 ``` 928 929 Run a container with the new `--ipc=host` option, and it now sees the shared memory segment from the host httpd: 930 931 ``` 932 $ docker run -it --ipc=host shm ipcs -m 933 934 ------ Shared Memory Segments -------- 935 key shmid owner perms bytes nattch status 936 0x01128e25 0 root 600 1000 7 937 ``` 938 Testing `--ipc=container:CONTAINERID` mode: 939 940 Start a container with a program to create a shared memory segment: 941 ``` 942 $ docker run -it shm bash 943 $ sudo shm/shm_server & 944 $ sudo ipcs -m 945 946 ------ Shared Memory Segments -------- 947 key shmid owner perms bytes nattch status 948 0x0000162e 0 root 666 27 1 949 ``` 950 Create a 2nd container correctly shows no shared memory segment from 1st container: 951 ``` 952 $ docker run shm ipcs -m 953 954 ------ Shared Memory Segments -------- 955 key shmid owner perms bytes nattch status 956 ``` 957 958 Create a 3rd container using the new --ipc=container:CONTAINERID option, now it shows the shared memory segment from the first: 959 960 ``` 961 $ docker run -it --ipc=container:ed735b2264ac shm ipcs -m 962 $ sudo ipcs -m 963 964 ------ Shared Memory Segments -------- 965 key shmid owner perms bytes nattch status 966 0x0000162e 0 root 666 27 1 967 ``` 968 969 ## Linking Containers 970 971 > **Note**: This section describes linking between containers on the 972 > default (bridge) network, also known as "legacy links". Using `--link` 973 > on user-defined networks uses the DNS-based discovery, which does not add 974 > entries to `/etc/hosts`, and does not set environment variables for 975 > discovery. 976 977 The link feature allows multiple containers to communicate with each other. For 978 example, a container whose Dockerfile has exposed port 80 can be run and named 979 as follows: 980 981 # docker run --name=link-test -d -i -t fedora/httpd 982 983 A second container, in this case called linker, can communicate with the httpd 984 container, named link-test, by running with the **--link=<name>:<alias>** 985 986 # docker run -t -i --link=link-test:lt --name=linker fedora /bin/bash 987 988 Now the container linker is linked to container link-test with the alias lt. 989 Running the **env** command in the linker container shows environment variables 990 with the LT (alias) context (**LT_**) 991 992 # env 993 HOSTNAME=668231cb0978 994 TERM=xterm 995 LT_PORT_80_TCP=tcp://172.17.0.3:80 996 LT_PORT_80_TCP_PORT=80 997 LT_PORT_80_TCP_PROTO=tcp 998 LT_PORT=tcp://172.17.0.3:80 999 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 1000 PWD=/ 1001 LT_NAME=/linker/lt 1002 SHLVL=1 1003 HOME=/ 1004 LT_PORT_80_TCP_ADDR=172.17.0.3 1005 _=/usr/bin/env 1006 1007 When linking two containers Docker will use the exposed ports of the container 1008 to create a secure tunnel for the parent to access. 1009 1010 If a container is connected to the default bridge network and `linked` 1011 with other containers, then the container's `/etc/hosts` file is updated 1012 with the linked container's name. 1013 1014 > **Note** Since Docker may live update the container's `/etc/hosts` file, there 1015 may be situations when processes inside the container can end up reading an 1016 empty or incomplete `/etc/hosts` file. In most cases, retrying the read again 1017 should fix the problem. 1018 1019 1020 ## Mapping Ports for External Usage 1021 1022 The exposed port of an application can be mapped to a host port using the **-p** 1023 flag. For example, an httpd port 80 can be mapped to the host port 8080 using the 1024 following: 1025 1026 # docker run -p 8080:80 -d -i -t fedora/httpd 1027 1028 ## Creating and Mounting a Data Volume Container 1029 1030 Many applications require the sharing of persistent data across several 1031 containers. Docker allows you to create a Data Volume Container that other 1032 containers can mount from. For example, create a named container that contains 1033 directories /var/volume1 and /tmp/volume2. The image will need to contain these 1034 directories so a couple of RUN mkdir instructions might be required for you 1035 fedora-data image: 1036 1037 # docker run --name=data -v /var/volume1 -v /tmp/volume2 -i -t fedora-data true 1038 # docker run --volumes-from=data --name=fedora-container1 -i -t fedora bash 1039 1040 Multiple --volumes-from parameters will bring together multiple data volumes from 1041 multiple containers. And it's possible to mount the volumes that came from the 1042 DATA container in yet another container via the fedora-container1 intermediary 1043 container, allowing to abstract the actual data source from users of that data: 1044 1045 # docker run --volumes-from=fedora-container1 --name=fedora-container2 -i -t fedora bash 1046 1047 ## Mounting External Volumes 1048 1049 To mount a host directory as a container volume, specify the absolute path to 1050 the directory and the absolute path for the container directory separated by a 1051 colon: 1052 1053 # docker run -v /var/db:/data1 -i -t fedora bash 1054 1055 When using SELinux, be aware that the host has no knowledge of container SELinux 1056 policy. Therefore, in the above example, if SELinux policy is enforced, the 1057 `/var/db` directory is not writable to the container. A "Permission Denied" 1058 message will occur and an avc: message in the host's syslog. 1059 1060 1061 To work around this, at time of writing this man page, the following command 1062 needs to be run in order for the proper SELinux policy type label to be attached 1063 to the host directory: 1064 1065 # chcon -Rt svirt_sandbox_file_t /var/db 1066 1067 1068 Now, writing to the /data1 volume in the container will be allowed and the 1069 changes will also be reflected on the host in /var/db. 1070 1071 ## Using alternative security labeling 1072 1073 You can override the default labeling scheme for each container by specifying 1074 the `--security-opt` flag. For example, you can specify the MCS/MLS level, a 1075 requirement for MLS systems. Specifying the level in the following command 1076 allows you to share the same content between containers. 1077 1078 # docker run --security-opt label=level:s0:c100,c200 -i -t fedora bash 1079 1080 An MLS example might be: 1081 1082 # docker run --security-opt label=level:TopSecret -i -t rhel7 bash 1083 1084 To disable the security labeling for this container versus running with the 1085 `--permissive` flag, use the following command: 1086 1087 # docker run --security-opt label=disable -i -t fedora bash 1088 1089 If you want a tighter security policy on the processes within a container, 1090 you can specify an alternate type for the container. You could run a container 1091 that is only allowed to listen on Apache ports by executing the following 1092 command: 1093 1094 # docker run --security-opt label=type:svirt_apache_t -i -t centos bash 1095 1096 Note: 1097 1098 You would have to write policy defining a `svirt_apache_t` type. 1099 1100 ## Setting device weight 1101 1102 If you want to set `/dev/sda` device weight to `200`, you can specify the device 1103 weight by `--blkio-weight-device` flag. Use the following command: 1104 1105 # docker run -it --blkio-weight-device "/dev/sda:200" ubuntu 1106 1107 ## Specify isolation technology for container (--isolation) 1108 1109 This option is useful in situations where you are running Docker containers on 1110 Microsoft Windows. The `--isolation <value>` option sets a container's isolation 1111 technology. On Linux, the only supported is the `default` option which uses 1112 Linux namespaces. These two commands are equivalent on Linux: 1113 1114 ``` 1115 $ docker run -d busybox top 1116 $ docker run -d --isolation default busybox top 1117 ``` 1118 1119 On Microsoft Windows, can take any of these values: 1120 1121 * `default`: Use the value specified by the Docker daemon's `--exec-opt` . If the `daemon` does not specify an isolation technology, Microsoft Windows uses `process` as its default value. 1122 * `process`: Namespace isolation only. 1123 * `hyperv`: Hyper-V hypervisor partition-based isolation. 1124 1125 In practice, when running on Microsoft Windows without a `daemon` option set, these two commands are equivalent: 1126 1127 ``` 1128 $ docker run -d --isolation default busybox top 1129 $ docker run -d --isolation process busybox top 1130 ``` 1131 1132 If you have set the `--exec-opt isolation=hyperv` option on the Docker `daemon`, any of these commands also result in `hyperv` isolation: 1133 1134 ``` 1135 $ docker run -d --isolation default busybox top 1136 $ docker run -d --isolation hyperv busybox top 1137 ``` 1138 1139 ## Setting Namespaced Kernel Parameters (Sysctls) 1140 1141 The `--sysctl` sets namespaced kernel parameters (sysctls) in the 1142 container. For example, to turn on IP forwarding in the containers 1143 network namespace, run this command: 1144 1145 $ docker run --sysctl net.ipv4.ip_forward=1 someimage 1146 1147 Note: 1148 1149 Not all sysctls are namespaced. Docker does not support changing sysctls 1150 inside of a container that also modify the host system. As the kernel 1151 evolves we expect to see more sysctls become namespaced. 1152 1153 See the definition of the `--sysctl` option above for the current list of 1154 supported sysctls. 1155 1156 # HISTORY 1157 April 2014, Originally compiled by William Henry (whenry at redhat dot com) 1158 based on docker.com source material and internal work. 1159 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> 1160 July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> 1161 November 2015, updated by Sally O'Malley <somalley@redhat.com>