docker: fix ip forwarding in containers when the host is running systemd

Finally this is fixed.  Thanks Arch Linux wiki.
This commit is contained in:
Albert Hopkins 2016-12-04 22:45:40 +00:00
parent 9408257dd4
commit 285ad6c8de
3 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,3 @@
net.ipv4.ip_forward=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.all.forwarding=1

View File

@ -1,6 +1,8 @@
preinstall:
postinstall:
postinstall: 30-ipforward.conf eth.network
cp 30-ipforward.conf $(CHROOT)/etc/sysctl.d/
cp eth.network $(CHROOT)/etc/systemd/network/
$(inroot) systemctl enable docker.service
clean:

View File

@ -0,0 +1,5 @@
[Match]
[Network]
DHCP=both
IPForward=kernel