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:
parent
9408257dd4
commit
285ad6c8de
|
@ -0,0 +1,3 @@
|
||||||
|
net.ipv4.ip_forward=1
|
||||||
|
net.ipv6.conf.default.forwarding=1
|
||||||
|
net.ipv6.conf.all.forwarding=1
|
|
@ -1,6 +1,8 @@
|
||||||
preinstall:
|
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
|
$(inroot) systemctl enable docker.service
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
[Match]
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
DHCP=both
|
||||||
|
IPForward=kernel
|
Loading…
Reference in New Issue