0

when building python-flask webapp docker image. I am getting error with "pip install -r requirements.txt" command .

RUN pip install -r requirements.txt ---> Running in 40b23f91d616 Processing /tmp/build/80754af9/bidict_1607541094382/work ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/tmp/build/80754af9/bidict_1607541094382/work' The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1 

Source code with Dockerfile is available on github profile whose link is https://github.com/OCTO01032020-araju/Travel-WebApp-Flask.git

My Dockerfile:

FROM python:alpine3.7 COPY . /app WORKDIR /app ADD requirements.txt /app/ RUN pip install --upgrade pip RUN pip install -r requirements.txt EXPOSE 5001 ENTRYPOINT [ "python" ] CMD [ "app.py" ] 
4
  • 1
    I don't see any requirments.txt file in your git code, hence the pip install command failed. Commented Jan 24, 2021 at 7:54
  • 1
    neither the requirements.txt nor the Dockerfile are on github Commented Jan 24, 2021 at 7:54
  • 1
    Remove the @ <file> entries from your requirements.txt and replace them with version strings Commented Jan 24, 2021 at 8:14
  • You need to recreate your requirements.txt using pip list --format=freeze > requirements.txt Commented Jan 24, 2021 at 8:34

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.