Docker-DCO-1.1-Signed-off-by: Timothy <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)
| ... | ... |
@@ -536,6 +536,11 @@ values. |
| 536 | 536 |
**not** let the container reconfigure the host network stack — that |
| 537 | 537 |
would require `--privileged=true` — but it does let container |
| 538 | 538 |
processes open low-numbered ports like any other root process. |
| 539 |
+ It also allows the container to access local network services |
|
| 540 |
+ like D-bus. This can lead to processes in the container being |
|
| 541 |
+ able to do unexpected things like |
|
| 542 |
+ [restart your computer](https://github.com/dotcloud/docker/issues/6401). |
|
| 543 |
+ You should use this option with caution. |
|
| 539 | 544 |
|
| 540 | 545 |
* `--net=container:NAME_or_ID` — Tells Docker to put this container's |
| 541 | 546 |
processes inside of the network stack that has already been created |
| ... | ... |
@@ -152,7 +152,7 @@ Supported networking modes are: |
| 152 | 152 |
|
| 153 | 153 |
* none - no networking in the container |
| 154 | 154 |
* bridge - (default) connect the container to the bridge via veth interfaces |
| 155 |
-* host - use the host's network stack inside the container |
|
| 155 |
+* host - use the host's network stack inside the container. Note: This gives the container full access to local system services such as D-bus and is therefore considered insecure. |
|
| 156 | 156 |
* container - use another container's network stack |
| 157 | 157 |
|
| 158 | 158 |
#### Mode: none |
| ... | ... |
@@ -65,7 +65,7 @@ func parseRun(cmd *flag.FlagSet, args []string, sysInfo *sysinfo.SysInfo) (*Conf |
| 65 | 65 |
flWorkingDir = cmd.String([]string{"w", "-workdir"}, "", "Working directory inside the container")
|
| 66 | 66 |
flCpuShares = cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
| 67 | 67 |
flCpuset = cmd.String([]string{"-cpuset"}, "", "CPUs in which to allow execution (0-3, 0,1)")
|
| 68 |
- flNetMode = cmd.String([]string{"-net"}, "bridge", "Set the Network mode for the container\n'bridge': creates a new network stack for the container on the docker bridge\n'none': no networking for this container\n'container:<name|id>': reuses another container network stack\n'host': use the host network stack inside the contaner")
|
|
| 68 |
+ flNetMode = cmd.String([]string{"-net"}, "bridge", "Set the Network mode for the container\n'bridge': creates a new network stack for the container on the docker bridge\n'none': no networking for this container\n'container:<name|id>': reuses another container network stack\n'host': use the host network stack inside the contaner. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.")
|
|
| 69 | 69 |
// For documentation purpose |
| 70 | 70 |
_ = cmd.Bool([]string{"#sig-proxy", "-sig-proxy"}, true, "Proxify all received signal to the process (even in non-tty mode)")
|
| 71 | 71 |
_ = cmd.String([]string{"#name", "-name"}, "", "Assign a name to the container")
|