I want to run nginx inside a docker container as a reverse proxy to talk to an instance of gunicorn running on the host machine (possibly inside another container, but not necessarily). I've seen solutions involving docker compose but I'd like to learn how to do it "manually" first without learning a new tool, right now.
The simplified version of the problem is this:
- Say I run a docker container on my machine.
- Outside the container, I run gunicorn on port 5000.
- From within the container, I want to run
ping ???
and have it reach the gunicorn instance run in step 2.
How can I do this in a simple, portable way?