On my laptop I can start simple flask app:
import os
import io
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
        s = """
                This is a localhost!
        """
        return (s)
if __name__ == "__main__":
        app.run(host='0.0.0.0', port=3000, debug=True)
And when do curl localhost:3000 on my laptop - I can get a good response.
But when I start a docker image and put same code and start it with same version of Python - it shows as running but when I do from within a docker curl localhost:3000 - do not get any response (it just hangs and nothing happens). 
How to enable localhost (routing) inside docker? Thanks.
 
    