Closed Noschvie closed 2 years ago
Hi Norbert,
Thanks for opening this issue.
On the face of it, this is a transient problem that is one step removed from PiBuilder.
If you drill down into the 04 script, most of the complexity is for Supervised Home Assistant. If Home Assistant is not being installed then it boils down to:
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -G docker -a $USER
sudo usermod -G bluetooth -a $USER
and then there's a bit more complexity for getting modern docker-compose
installed.
In your output, the "Could not resolve host: download.docker.com" error message is coming from the sudo sh
which is running the "get.docker.com" script just downloaded by curl
. That error terminates the "get.docker.com" script before it adds the "docker" group to /etc/groups
, so the first usermod
then fails too.
If you think about it, the very fact that the script was able to start running proves:
curl
was able to resolve the name "get.docker.com"; andcurl
was able to download the script from "get.docker.com" in order to pipe it to sudo sh
.That's what suggests to me that the "get.docker.com" script's inability to resolve "download.docker.com" is probably transient.
The host "download.docker.com" is resolvable from my system:
$ date ; dig download.docker.com +short
Sat Mar 12 09:52:06 AEDT 2022
d2h67oheeuigaw.cloudfront.net.
99.86.143.82
99.86.143.16
99.86.143.116
99.86.143.107
If you run the same dig
command and get a bunch of IP addresses (not necessarily the same ones) then it is probably safe to conclude "transient". If, however, your system is still unable to resolve "download.docker.com" then it would suggest a more persistent problem which has something to do with your DNS arrangements. That's something you would need to figure out (I could give you a few tips so please don't be afraid of asking).
Having said all that, I take your point about how the 04 script should be better behaved. I'll start checking the "get.docker.com" script's exit code and bung out an "unable to proceed" message.
If the dig download.docker.com
test succeeds at your end and you want to try repairing your system, you should be able to just run:
$ curl -fsSL https://get.docker.com | sudo sh
$ sudo usermod -G docker -a $USER
$ sudo usermod -G bluetooth -a $USER
$ sudo reboot
You could also read through Reinstalling docker + docker-compose. That guide is intended for situations where components are half-installed. What it tells you to do is more "brute force" but it will get the job done.
Hi Phill thanks for your explanation. Did an installation from scratch and now it's ok
$ date ; dig download.docker.com +short
Sun 13 Mar 18:17:11 CET 2022
d2h67oheeuigaw.cloudfront.net.
13.32.121.111
13.32.121.35
13.32.121.78
13.32.121.29
Code added to 04 script to check exit code from docker install script, display some (hopefully) helpful text, and exit the 04 script at that point. That should mean that, if there's a transient like you experienced, it would be safe to just wait a while then rerun 04.
Hi Phill
running script 04_setup.sh leads to "Could not resolve host: download.docker.com". In this case I suggest to skip the installation of docker-compose and terminate the script with a warning. I have overlooked the error message and during .\menu.sh docker was missing
What do you mean? thanks, Norbert