Sending requests between containers

I’m creating a REST API webservice in one container and a client for this WS in another container.
When the client is trying to reach the WS it cannot resolve the hostname.
I’m guessing this is because of the Docker + NGINX proxy setup that Local uses.

I’m using Guzzle when sending requests and this is the error i get:
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: (see in /app/public/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 186

Is there a workaround for this?
Will sending requests between containers be possible in future releases?

Keep up the good work!
Best regards,
Robert S.
Dekode Interaktiv AS

Update: the request seems to work when requesting the webservice over http (port 80), not over https (port 443). Probably because the SSL/TLS-termination happens before the request gets proxied into the container.

Yup, that’s correct. HTTPS is only currently handled at the router container level.

We have plans to serve HTTPS directly from site containers in future versions of the Preferred and Custom environments.

Sorry for the trouble!

1 Like

Awesome, thanks for the reply.
Looking forward to the versions to come!