I have a small web application the runs on a flask server, which can normally be run on local host, by running app.py. I would like to run it in a docker container, so I cannot use localhost. An alternative would be using 0.0.0.0
, which works fine normally, however this does not work when I'm on my work proxy.
How could I get past this issue?
app.py
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def main():
return render_template('index.html')
if __name__ == "__main__":
app.run(host='0.0.0.0')
Dockerfile
FROM python:2.7.13
ADD . /code
WORKDIR /code
RUN pip install Flask --proxy=[proxy]
CMD ["python", "app.py"]