Curl can't resolve host:

Q: Date/Time this occurred (Provide your time zone also)
A: Discovered this on 22 Nov 2022, 15:00, Sao Paulo, BR time.

Q: DevKinsta Version
A: 2.8.0

Q: OS Version
A: MacOS Monterey, 12.6 (Running on M1 machine)

Q: Docker Desktop Version
A: v4.13.1

Q: Were any error codes or messages observed? If so, what were they?
A: curl: (6) Could not resolve host:

Q: Detailed Description of the Problem
A: We have a script that calls the url to retrieve the thumbnail of specific youtube videos for the user. But we can’t make the request to that URL using PHP, or even curl in the bash.

I can replicate this on bash and PHP. Here is a snippet how to replicate it using curl in bash:

docker exec -it devkinsta_fpm bash
curl -L
curl: (6) Could not resolve host:

But if I call the domain that redirects to www I get the same error:

curl -L
curl: (6) Could not resolve host:

If I try another domain, like:

curl -L
<it outputs the source code correctly>


curl -L
<it outputs the source code correctly>

It seems to be related to DNS. The content of /etc/resolv.conf is the following:

options ndots:0

If I change to:

options ndots:0

Those requests to youtube start working, but of course the local sites’ domains stop working.

I’m able to make requests to from another custom docker container, but not from inside the devkinsta_fpm.

Hi @andergmartins, thank you very much for the clear report and testing done here. Something similar came up in this thread without a solution that applies to what you are experiencing; that started an internal discussion about the DNS resolver we are using for DevKinsta. I’ll make sure the devs take a look at your findings/see if there’s a quick fix.

Hi @Kevin cool, thank you for the quick feedback. Yeah, that issue looks similar, sorry, I missed that one and created another thread here.

I will be glad to help. Please, could you, or the devs, give me a little more information about the DNS resolver used on DevKinsta? Which one, or where can I find it inside the container so I can try helping debugging or fixing that?

Is it related to the devkinsta_nginx container?

Oh, I found it when listing the devkinsta_fpm container’s processes.

It is shaman, and is running as the service dns_server.

I just tried doing the following:

dns_server list

And it displayed only the local domains I have on DevKinsta:


So I tried updating the register for the specific domain I need, running the command:

dns_server update -d

It returned:


And that worked! The local DNS server is able to find that domain.

Now it recognizes the domain and I can know run:

curl -L

And it returns the correct answer when doing the request throw PHP as well.

This is probably a temporary solution, but works for me for now.

I will comment on that other ticket, since I suppose that might help on that too.