Context:
- System: Win10 + WSL2 (Development environment)
- I'm new to both Flask and Docker
Problem:
If I don't run any docker containers, the Flask app I'm running on localhost can be connected from a browser (the app is run without using a container)
If I already have containers running with, say, Elasticsearch, or another Flask app, then the Flask app I'm running on localhost can NOT be connected anymore (again, this app is run without using a container)
On my terminal, the app still seems to be running properly
On my browser, it simply says "127.0.0.1 refused to connect"
The app is run simply using "flask run", and messages displayed on my terminal looks like this:
- Serving Flask app "microblog.py"
- Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
- Debug mode: off [2021-07-01 21:42:05,107] INFO in init: Microblog startup
- Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Question:
- Why would this happen - running containers messed up non-container Flask app listening to ports?
- How can I fix this?
Thanks!