Docker sometimes fails to connect to github.com

You don’t have exactly the problem stated in the thread you linked, and indeed you seem to have an intermittent problem, which is always the hardest to diagnose. But maybe you could try a manual fetch. I tried this, which is harmless:

# cd /var/discourse/
# ./launcher enter app
x86_64 arch detected.
# wget -O - -v https://github.com/discourse/logster.git/ |wc
--2023-01-04 15:30:25--  https://github.com/discourse/logster.git/
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/discourse/logster/ [following]
--2023-01-04 15:30:25--  https://github.com/discourse/logster/
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘STDOUT’

-                                                  [ <=>                                                                                                 ] 231.22K  --.-KB/s    in 0.06s   

2023-01-04 15:30:26 (3.99 MB/s) - written to stdout [236767]

   2751   15860  236767
#

We see that “github.com” was translated to a reasonable IP address, was contacted, and returned some data. In fact the command run inside the container behaved very much like it does outside the container, and that’s as expected.

Are you using a supported installation recipe, on a well-known hosting company?

1 Like