I'm trying out the new OCI image feature. It's very cool!
I use DHCP to manage IP addresses across services from the network. When I launch turnkeylinux templates, IP addressing works fine.
I've tried launching the nginx:latest image from docker hub. It gets an IP address but does not get a gateway. It is not accessible from outside the subnet. It is accessible from within the subnet.
If I assign it a static IP address and gateway, the container is accessible outside the subnet.
I've verified the missing gateway by using lxc-attach, installing iproute2 package, and checking 'ip route'. The gateway is missing. If I manually add the gateway with " ip route add def via <gateway ip address>" then connectivity is enabled and the container is accessible. (Note: to install the ip route package, I had to temporarily assign a static ip address/gateway so the container could get internet connectivity.)
I believe I need to enable "Host-Managed" since the container does not have a dhcp-client. Is this perhaps a difference between turnkeylinux templates? They seem to have udhcpc in them, so maybe this points to the issue.
Dave
I use DHCP to manage IP addresses across services from the network. When I launch turnkeylinux templates, IP addressing works fine.
I've tried launching the nginx:latest image from docker hub. It gets an IP address but does not get a gateway. It is not accessible from outside the subnet. It is accessible from within the subnet.
If I assign it a static IP address and gateway, the container is accessible outside the subnet.
I've verified the missing gateway by using lxc-attach, installing iproute2 package, and checking 'ip route'. The gateway is missing. If I manually add the gateway with " ip route add def via <gateway ip address>" then connectivity is enabled and the container is accessible. (Note: to install the ip route package, I had to temporarily assign a static ip address/gateway so the container could get internet connectivity.)
I believe I need to enable "Host-Managed" since the container does not have a dhcp-client. Is this perhaps a difference between turnkeylinux templates? They seem to have udhcpc in them, so maybe this points to the issue.
Dave