mikeizbicki / cmc-csci143

big data course materials
40 stars 76 forks source link

Issue with docker build -t flask-tutorial:latest . #412

Closed luisgomez214 closed 9 months ago

luisgomez214 commented 9 months ago

When I use the command "docker build -t flask-tutorial:latest ." I get the following error:

You are using pip version 8.1.1, however version 24.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1

I have tried updating and get:

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /home/Luis.Gomez.25/.local/lib/python3.6/site-packages (21.3.1)

I am not sure how to proceed.

abizermamnoon commented 9 months ago

I had the same problem. I added the following lines in my Dockerfile:

 RUN apt-get update -y && \
       apt-get install -y python3-pip python3-dev
 RUN pip3 install --upgrade pip==20.3.4 && \
      pip3 install -r requirements.txt
ENTRYPOINT [ "python3" ]