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
3
appliances/docker/30-ipforward.conf
Normal file
3
appliances/docker/30-ipforward.conf
Normal file
@ -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:
|
||||
|
||||
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:
|
||||
|
5
appliances/docker/eth.network
Normal file
5
appliances/docker/eth.network
Normal file
@ -0,0 +1,5 @@
|
||||
[Match]
|
||||
|
||||
[Network]
|
||||
DHCP=both
|
||||
IPForward=kernel
|
Loading…
Reference in New Issue
Block a user