Send curl Request to Subdomain on another Docker Container

Viewed 24

i have a short question:

I've got a docker container under localhost:80 and i want to send a curl request to the other container under api.localhost:8000. thing is i simply cant reach this subdomain, i could've used the container-name "my-example" but this only works for localhost:8000 not api.localhost:8000. I'm using Apache Webserver and docker-compose.

How can i send the requests to the subdomain?

Thanks for helping!

0 Answers
Related