gcloud Connection Issue During Docker Build

Viewed 100

During pip install requirements.txt step within my Dockerfile, the Google Cloud Shell disconnects. The error message is:

The connection to your Google Cloud Shell was lost.

The logs before the error are:

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)

I then try to reconnect, but my image was never created. My Dockerfile is below:

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

My requirements.txt file contains:

Flask
pandas
numpy
scipy
scikit-learn

Why do I lose connection to the the Google Cloud Shell when running the step: pip install requirements.txt in my Dockerfile?

0 Answers
Related