Sending a curl request to a dockerized nginx+gunicorn+flask app #2639
-
In the dockerfile of my app, I've exposed port 5000, using:
To run the image:
Outside the container, if I wanted to do the curl request, I would use something like: where and <flask_route> should be substituted for the real values. In the nginx.conf file:
Now, when I do, outside the container, in a client: I receive the following content:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The problem was when binding gunicorn, I should have done: Both 5000... |
Beta Was this translation helpful? Give feedback.
The problem was when binding gunicorn, I should have done:
$ docker run -it -p 5000:5000 <image_name> bash
Both 5000...