The following exception probably indicates you have misconfigured DNS resolver(s)

When I run composer install on GitHub - slimphp/Slim-Skeleton: Slim Framework 4 Skeleton Application I get this output:
gist:0640f643e6ea57a35258b254c01d05e1 · GitHub

It ends with following error:

- Syncing slim/slim (4.7.1) into cache
 54/54 [============================] 100%The following exception probably indicates you have misconfigured DNS resolver(s)


  [Composer\Downloader\TransportException]
  curl error 6 while downloading https://api.github.com/: Could not resolve host: api.github.com

I know this is Docker related but the question is how come its able to download other things? nslookup gives me this:

bash-5.1# nslookup api.github.com
Server:		127.0.0.11
Address:	127.0.0.11:53

** server can't find api.github.com: NXDOMAIN

Non-authoritative answer:
Name:	api.github.com
Address: 140.82.114.5

any ideas how to fix this? we have tried attaching the container to another network but the issue remains.

Hello!

In my case I receive:

mauro@MacBook-Pro-de-Mauro /tmp $ nslookup api.github.com
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
Name:	api.github.com
Address: 140.82.112.6

Maybe you can try to install the Slim App Skel using:

composer create-project slim/slim-skeleton [my-app-name]

It’s working fine here…maybe you have some network issue?

Hi,

That command was giving me same error. So what I did was: