DEV Community

Berk CAN
Berk CAN

Posted on

Docker. Communication between Laravel containers

I have a project that I am trying to develop with a microservices approach. I prepared the APIs on two separate microservices and completed their tests. When I send a request from container A to container B, I get the error cURL error 7: Could not connect to localhost port 8100: Connection refused. After my research, I couldn't find a solution.

Address

Top comments (2)

Collapse
 
as0t profile image
as0t

You cannot use localhost to access another container. You should use the container name.

forums.docker.com/t/how-to-communi...

Collapse
 
nrkdrk profile image
Berk CAN

Thanks