Reputation: 431
i have problem when i tried to build container. And the error is :
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
i don't know why, i follow the code from documentation but always get error.
Dockerfile
FROM python:2.7-slim
#
# # Set the working directory to /app
WORKDIR /app
#
# # Copy the current directory contents into the container at /app
ADD . /app
#
# # Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt
#
# # Make port 80 available to the world outside this container
EXPOSE 80
#
# # Define environment variable
ENV NAME World
#
# # Run app.py when the container launches
CMD ["python", "app.py"]
Upvotes: 3
Views: 5720
Reputation: 1864
Seems issue with the location of the file try to give absolute path of the file that you are referring in dockerfile
Upvotes: 2