The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
我不知道为什么,我遵循文档中的代码但总是出错。
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"]
答案 0 :(得分:2)
看似文件位置的问题尝试给出你在dockerfile中引用的文件的绝对路径