Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Fix for static IP breaks docker start up? #373

Open
Bazmundi opened this issue Aug 22, 2020 · 1 comment
Open

Fix for static IP breaks docker start up? #373

Bazmundi opened this issue Aug 22, 2020 · 1 comment

Comments

@Bazmundi
Copy link

Bazmundi commented Aug 22, 2020

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?

@jhofmueller
Copy link

You can use the --file flag from flash and copy a file named network-config onto the sd card. Here is documentation for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants