I've got a VM built from a Dockerfile, the build all happens fine, both on it's own or if spawned by 'gcloud preview app deploy ...'
It gets to the end where it says 'Successfully built'
However, when doing this with gcloud, it then starts giving me a ton of errors like this:
ERROR: Failed to generate layer archive: write /var/lib/docker/graph/_tmp/7f20216219b569e64ac06dbb121792c0bf2e2e1d47492ef14a1664cb5fdf9ae7/577820362: no space left on device
At the end it then says:
Unable to push the image to/from the registry: "Failed to generate layer archive: mkdir /var/lib/docker/graph/_tmp/e581bf80f74ce1c98909d0f588132c8bc561695093399e634fe431c38c2d5b9c: no space left on device"
If you would like to report this issue, please run the following command:
gcloud feedback
It then sometimes properly deletes the VM on GCE, but other times it just hangs and I have to manually delete it through the dev console.
I'm running on Ubuntu 14.04, I have docker 1.8.1, and the latest gcloud components. Docker info:
Containers: 6
Images: 63
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 75
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.16.0-46-generic
Operating System: Ubuntu 14.04.3 LTS
CPUs: 8
Total Memory: 23.46 GiB
Name: clavius
ID: BBJV:U7VU:BWQI:G4EZ:5QB3:U2IZ:ZG3G:X6KF:GCQT:GHJO:YZ5U:M5YN
Username: matthewhanson
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
I am not running out of space on my root drive where /var/lib/docker is located, nor do I have any problem with inodes.
Thanks in advance for any help you can provide, this is proving to be a difficult and elusive issue.
matt
###############
runtime: python27
threadsafe: true
api_version: 1
vm: true
handlers:
- url: /.*
script: miru.api.app
I tried upping the size but got the same result. Here's the output around one of the errors with debug verbosity:
INFO: Image e8f0aff7d819 already pushed, skipping
INFO: Pushing
ERROR: Failed to generate layer archive: mkdir /var/lib/docker/graph/_tmp/7ce1c1718f7a273b54fca0a8dd2a5e6480f655dc069ff521606e9820a68b2d2a: no space left on device
INFO: Exception Unable to push the image to/from the registry: "Failed to generate layer archive: mkdir /var/lib/docker/graph/_tmp/7ce1c1718f7a273b54fca0a8dd2a5e6480f655dc069ff521606e9820a68b2d2a: no space left on device" thrown in ProgressHandler. Retrying.
INFO: Starting new HTTPS connection (1): appengine.gcr.io
DEBUG: "GET /v2/ HTTP/1.1" 404 1428
INFO: Starting new HTTPS connection (1): appengine.gcr.io
DEBUG: "GET /v1/_ping HTTP/1.1" 200 None
INFO: Starting new HTTPS connection (21): 104.197.120.5
My Dockerfile uses another image we made, so I'm trying to replicate this problem with a simpler config, and will post shortly.
#####################################
FROM snhq/basic-gae
RUN apt-get update
# install numpy/scipy
RUN apt-get install -y libatlas-base-dev gfortran
RUN pip install numpy
RUN pip install scipy
# install PIL
RUN apt-get install -y libjpeg-dev libpng-dev
RUN pip install pillow
# opencv install derived from this blogpost:
# http://rodrigoberriel.com/2014/10/installing-opencv-3-0-0-on-ubuntu-14-04/
# install opencv deps
RUN apt-get update
RUN apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff4-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils
#RUN apt-get install -y software-properties-common
RUN apt-get remove libav-tools
#RUN apt-get install -y python-software-properties
#RUN add-apt-repository ppa:mc3man/trusty-media
RUN apt-get update && apt-get install -y ffmpeg
# install opencv
ENV version="3.0.0"
WORKDIR /tmp
RUN wget https://github.com/Itseez/opencv/archive/${version}.zip
RUN unzip ${version}.zip
RUN rm ${version}.zip
RUN wget https://github.com/Itseez/opencv_contrib/archive/3.0.0.zip
RUN unzip ${version}.zip
WORKDIR /tmp/opencv-${version}
RUN mkdir /tmp/opencv-${version}/build
WORKDIR /tmp/opencv-${version}/build
# http://stackoverflow.com/a/27406016/699026
#RUN apt-get install -y qt5-default
# http://stackoverflow.com/a/27347104/699026
# http://answers.opencv.org/question/25824/installation-problems-build_new_python_support/
RUN cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_FFMPEG=OFF -D WITH_CUDA=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${version}/modules -D WITH_IPP=OFF -D HAVE_QT5=OFF ..
RUN make -j $(nproc)
RUN make install
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf
RUN ldconfig
RUN rm -rf /tmp/opencv*
WORKDIR /
matt