Docker的构build似乎在安装非pip Python包时会挂起

我有一些非PIP包,

我已经写入到我的requirements.txt中,如下所示:

git+https://github.com/manahl/arctic.git 

这似乎在我的本地主机工作正常,但是当我做dockerbuild设我得到这个:

 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"] 

如果scripts文件夹存在于当前目录中,请尝试RUN pip install -r /scripts/requirements.txt