我有一些非点子包,
我已将其写入我的requirements.txt中:
git+https://github.com/manahl/arctic.git
这似乎在我的localhost上运行正常,但是当我进行docker build时我得到了这个:
Collecting git+https://github.com/manahl/arctic.git (from -r scripts/requirements.txt (line 11))
│ Cloning https://github.com/manahl/arctic.git to /tmp/pip-1gw7spz2-build
它似乎挂了。它在几分钟后静静地移动,但它看起来并没有起作用。对于每个基于git的依赖,它似乎都是这样做的。
我做错了什么?
Dockerfile:
FROM python:3.6.1
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ADD . /app
RUN apt-get update && apt-get install -y \
git\
build-essential
# Install any needed packages specified in requirements.txt
RUN pip install -r scripts/requirements.txt
# Run app.py when the container launches
CMD ["python", "scheduler.py"]
答案 0 :(得分:0)
如果当前目录中存在scripts
文件夹,请尝试RUN pip install -r /scripts/requirements.txt