You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is what made it work for me today. I also needed to map top port 5000 on the backend but not sure why.
FROM ubuntu
RUN apt-get update
RUN apt-get install -y python2 python-pip
RUN pip2 install flask
COPY app.py /opt/app.py
ENTRYPOINT FLASK_APP=/opt/app.py flask run --host=0.0.0.0
My app.py file looks like this
import os
from flask import Flask
app = Flask(__name__)
@app.route("/")
def main():
return "Welcome!"
@app.route('/how are you')
def hello():
return 'I am good, how about you?'
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8080)
Hi,
The old docker file is not working getting error -> I have updated the docker file (Thank You for your docker course)
FROM ubuntu
RUN apt-get update && apt-get install -y python3 python3-pip
RUN pip install Flask
COPY app.py /opt/
ENTRYPOINT FLASK_APP=/opt/app.py flask run --host=0.0.0.0 --port=8080
The text was updated successfully, but these errors were encountered: