From 79a0fa29f1de0be0d69adf54a63eed7312d4be70 Mon Sep 17 00:00:00 2001 From: ChristoperBiscardi Date: Sun, 8 Mar 2015 16:18:43 -0700 Subject: [PATCH 1/2] Fix a few code rendering errors in docs Signed-off-by: ChristoperBiscardi --- docs/sources/articles/networking.md | 14 +++++--------- docs/sources/reference/run.md | 2 -- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/docs/sources/articles/networking.md b/docs/sources/articles/networking.md index e1195e10d1..102155b319 100644 --- a/docs/sources/articles/networking.md +++ b/docs/sources/articles/networking.md @@ -228,13 +228,11 @@ Whether a container can talk to the world is governed by two factors. Docker will go set `ip_forward` to `1` for you when the server starts up. To check the setting or turn it on manually: - ``` - $ cat /proc/sys/net/ipv4/ip_forward - 0 - $ echo 1 > /proc/sys/net/ipv4/ip_forward - $ cat /proc/sys/net/ipv4/ip_forward - 1 - ``` + $ cat /proc/sys/net/ipv4/ip_forward + 0 + $ echo 1 > /proc/sys/net/ipv4/ip_forward + $ cat /proc/sys/net/ipv4/ip_forward + 1 Many using Docker will want `ip_forward` to be on, to at least make communication *possible* between containers and @@ -463,9 +461,7 @@ your host's interfaces you should set `accept_ra` to `2`. Otherwise IPv6 enabled forwarding will result in rejecting Router Advertisements. E.g., if you want to configure `eth0` via Router Advertisements you should set: - ``` $ sysctl net.ipv6.conf.eth0.accept_ra=2 - ``` ![](/article-img/ipv6_basic_host_config.svg) diff --git a/docs/sources/reference/run.md b/docs/sources/reference/run.md index 268ade05ee..ac35973ae9 100644 --- a/docs/sources/reference/run.md +++ b/docs/sources/reference/run.md @@ -475,7 +475,6 @@ By default, the container will be able to `read`, `write`, and `mknod` these dev This can be overridden using a third `:rwm` set of options to each `--device` flag: -``` $ sudo docker run --device=/dev/sda:/dev/xvdc --rm -it ubuntu fdisk /dev/xvdc Command (m for help): q @@ -489,7 +488,6 @@ This can be overridden using a third `:rwm` set of options to each `--device` fl $ sudo docker run --device=/dev/sda:/dev/xvdc:m --rm -it ubuntu fdisk /dev/xvdc fdisk: unable to open /dev/xvdc: Operation not permitted -``` In addition to `--privileged`, the operator can have fine grain control over the capabilities using `--cap-add` and `--cap-drop`. By default, Docker has a default From 4ab18fa2ac119c26516f2156dabda9dd0a781301 Mon Sep 17 00:00:00 2001 From: ChristoperBiscardi Date: Tue, 10 Mar 2015 19:28:55 -0700 Subject: [PATCH 2/2] Modify ip_forward instructions Signed-off-by: ChristoperBiscardi --- docs/sources/articles/networking.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sources/articles/networking.md b/docs/sources/articles/networking.md index 102155b319..e4471dc745 100644 --- a/docs/sources/articles/networking.md +++ b/docs/sources/articles/networking.md @@ -228,11 +228,11 @@ Whether a container can talk to the world is governed by two factors. Docker will go set `ip_forward` to `1` for you when the server starts up. To check the setting or turn it on manually: - $ cat /proc/sys/net/ipv4/ip_forward - 0 - $ echo 1 > /proc/sys/net/ipv4/ip_forward - $ cat /proc/sys/net/ipv4/ip_forward - 1 + $ sysctl net.ipv4.conf.all.forwarding + net.ipv4.conf.all.forwarding = 0 + $ sysctl net.ipv4.conf.all.forwarding=1 + $ sysctl net.ipv4.conf.all.forwarding + net.ipv4.conf.all.forwarding = 1 Many using Docker will want `ip_forward` to be on, to at least make communication *possible* between containers and