Unable to curl from one container to another Unable to curl from one container to another curl curl

Unable to curl from one container to another


I had the same issue, and I had success when I tried to make the curl without http . You should try doing curl name_of_container:8080/path/to/web/method . That worked for me because inside the docker compose, it doesn't need SSL.


In your django app, change it from listening on 127.0.0.1 to listen on all interfaces with 0.0.0.0. Docker containers get their own network namespace, so you can't access another container's loopback interface.

Also, your ports do not match. Django is responding on 9000, so from container to container, you need to use port 9000. The mapping to your published port only happens on the docker host. And exposing a port really doesn't do anything for this use case.

Lastly, from your host, you have the ports reversed. It's the port on the host followed by the port inside the container. So "8080:9000".