Docker生成期间的gcloud连接问题

在我的Dockerfile中的pip install requirements.txt步骤中,Google Cloud Shell断开连接。 错误消息是:

 The connection to your Google Cloud Shell was lost. 

错误发生之前的日志是:

 Step 3 : WORKDIR /app ---> Running in fd690eb34995 ---> 565d7a3d5ce1 Removing intermediate container fd690eb34995 Step 4 : RUN pip install -r requirements.txt ---> Running in 18e2513dcbe8 Collecting Flask (from -r requirements.txt (line 1)) Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB) Collecting pandas (from -r requirements.txt (line 2)) Downloading pandas-0.20.1-cp27-cp27mu-manylinux1_x86_64.whl (22.3MB) Collecting numpy (from -r requirements.txt (line 3)) Downloading numpy-1.12.1-cp27-cp27mu-manylinux1_x86_64.whl (16.5MB) Collecting scipy (from -r requirements.txt (line 4)) Downloading scipy-0.19.0-cp27-cp27mu-manylinux1_x86_64.whl (45.0MB) 

然后我尝试重新连接,但是我的图像从未被创build。 我的Dockerfile如下:

 # Use an official Python runtime as a base image FROM python:2.7-slim # Copy the current directory contents into the container at /app ADD . /app # Set the working directory to /app WORKDIR /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 8080 # Define environment variable ENV NAME World # Run app.py when the container launches CMD ["python", "app.py"] 

我的requirements.txt文件包含:

 Flask pandas numpy scipy scikit-learn 

在Dockerfile中运行步骤: pip install requirements.txt ,为什么我会失去与Google Cloud Shell的连接?