Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install not working #23

Open
dishoneprabu opened this issue Jan 9, 2023 · 3 comments
Open

pip install not working #23

dishoneprabu opened this issue Jan 9, 2023 · 3 comments

Comments

@dishoneprabu
Copy link

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

@dishoneprabu
Copy link
Author

commit details: 351e861

@akhilesh-patel
Copy link

New Docker file it's working 👍
Screenshot (238)

@wnadim92
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants