1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

much improved wording for manual network config setup on arch install docs by @moxiegirl

Signed-off-by: Oriol Francès <oriolfa@gmail.com>
This commit is contained in:
Oriol Francès 2015-07-26 19:11:27 +02:00
parent e1b57b2a87
commit 26fa9b0d0d

View file

@ -66,11 +66,17 @@ If you need to add an HTTP Proxy, set a different directory or partition for the
Docker runtime files, or make other customizations, read our systemd article to
learn how to [customize your systemd Docker daemon options](/articles/systemd/).
## Running docker with a manually defined network
## Running Docker with a manually-defined network
Users of systemd-network >= v220 who have configured their network manually by
creating an `<interface>.network` file in `/etc/systemd/network/` may have to add
the following line to make sure IP Forwarding is not disabled:
If you manually configure your network using `systemd-network` version 220 or
higher, containers you start with Docker may be unable to access your network.
Beginning with version 220, the forwarding setting for a given network
(`net.ipv4.conf.<interface>.forwarding`) defaults to *off*. This setting
prevents IP forwarding. It also conflicts with Docker which enables the
`net.ipv4.conf.all.forwarding` setting within a container.
To work around this, edit the `<interface>.network` file in
`/etc/systemd/network/` on your Docker host add the following block:
```
[Network]
@ -79,14 +85,7 @@ IPForward=kernel
...
```
From systemd-network v220 onwards, the forwarding setting for a given network
defaults to *off* (instead of not being set). This prevents IP Forwarding to
happen, since docker only enables `net.ipv4.conf.all.forwarding` (which is
overriden by `net.ipv4.conf.<interface>.forwarding` being disabled)
Adding `IPForward=kernel` to the `<interface>.network` file prevents this
behavior, allowing IP Forwarding to function as expected.
This configuration allows IP forwarding from the container as expected.
## Uninstallation
To uninstall the Docker package: