image-builder-rpi
image-builder-rpi copied to clipboard
Fix for static IP breaks docker start up?
I "fixed" the problem of setting a static IP for Hypriot 1.12.3 to create another problem. Note that I did diverge from a suggested "fix" for static IP but because it made no difference for 1.12.3. Now that I have "fixed" the static IP problem I created the following problem:
$ docker-compose up
Pulling mybroker (emqx/emqx:v3.2.7)...
ERROR: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:38188->[::1]:53: read: connection refused
Noting that without applying the static IP "fix" docker-compose up happily pulls and starts my emqx, node-red, deCONZ and homeassistant containers.
There must be a "fix" for static IP that doesn't break docker pull?
When static IP "fix" has not been applied then /etc/resolv.conf is updated automatically with the nameservers that my gateway holds in it's list by the DHCP server on that gateway. However, I note that with static IP "fix" applied then /etc/resolv.conf is empty of nameservers.
So, any fix for static IP still needs to pull nameservers down from gateway automatically into /etc/resolv.conf. At least, information is that dhclient usually rewrites resolv.conf with information received from the DHCP server. I assume that dhclient is disabled somewhere in the background when the cloud init config is disabled?
So, safe to say the static IP "fix" breaks something else. Presumably disabling the cloud init config is the culprit?
Is there then a static IP "fix" that still allows auto updates of /etc/resolv.conf to continue to happen?
You can use the --file
flag from flash
and copy a file named network-config
onto the sd card. Here is documentation for it.