No Space Left on Device even after moving Hyper-V Disk

I’ve searched this forum and Github issues, as well as generic Google searches before opening this.

I was building an image today and receive the error No Space Left on Device. Or more specifically:
Step 15 : RUN find . -type f -exec chmod 660 {} ;
—> Running in 4bf6a394d565
e[31mERRORe[0m: Service ‘build_magento’ failed to build: Error processing tar file(exit status 1): open /var/www/html/node_modules/grunt-contrib-jasmine/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/node_modules/extract-zip/node_modules/concat-stream/node_modules/readable-stream/node_modules/isarray/index.js: no space left on device

Normally I clear any unused (dangling) containers, volumes, and images and it works as normal. This time isn’t the case.

I opened up the Hyper-V settings and moved the virtual disk to a larger hard drive, even though there was still about 20GB left on the C drive. I also expanded the virtual disk to 120GB. It was at 49GB of maximum 60GB.

I tried the build again and it keeps stating it’s out of disk space even though the virtual hard drive says it’s using 50.35GB of 120GB. I’d prefer to not have to wipe out the other images and containers just to build this image.

I’m not sure if you can use a diagnostic ID here, but here it is: D6B73A3E-57A2-46F7-A54B-9D6FFA69FD40/2016-10-12_22-32-30

I’m completely stumped, so I would appreciate any help. Thanks!

Hi,
I am getting the same problem.
Have you a fix for this ?
Cheers

I had to remove some older containers and their volumes unfortunately.

Also, in my Dockerfile, I concatenated a few commands using backslashes that processed a lot of data, which seemed to help.

I wish I had more to offer.

Cool.

I will look check it out.

Cheers

If you want to post your Dockerfile, I can see if anything stands out…

Hi,

This is my Dockerfile

FROM ubuntu MAINTAINER xxxx RUN locale-gen en_US.UTF-8 ENV LC_ALL=en_US.UTF-8 ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US.UTF-8 ENV PERL_UNICODE "AS" ENV LANG C.UTF-8 RUN apt-get -qq update RUN apt-get -qqy install python3 git ipython screen htop vim octave cmake cmake-curses-gui build-essential g++ cmake cmake-curses-gui bison flex freeglut3 freeglut3-dev libxi6 libxi-dev libxmu6 libxmu-dev libxmu-headers python3-pip python3-dev python3-scipy python3-numpy python3-lxml imagemagick zlib1g-dev RUN mkdir -p /opt WORKDIR /opt RUN make RUN make install WORKDIR /opt/nipype RUN pip3 install -U pip RUN pip3 install networkx RUN pip3 install traits RUN pip3 install nose RUN pip3 install future RUN pip3 install simplejson RUN pip3 install prov RUN python3 setup.py install ENV PYTHONPATH /opt/volgenmodel-nipype ENV PATH /opt/volgenmodel-nipype/extra-scripts:$PATH ENV PERL5LIB /usr/local/perl ADD go.py /opt/ ADD go.sh /opt/ WORKDIR /opt CMD /bin/bash

I also see that, though I have installed python3, inside the container the default version of python2.7 is beiing implemented ( as also indicated by /usr/bin/python).

Do you have any insight on how can I ask my Dockerfile to look at python 3 instead of python 2. I know I can manually set that path once I enter the container. But I want to run algorithm without changing python libraries all the time.

Cheers

There are a couple of places where you could combine the lines. Here are the ones I would suggest.

RUN apt-get -qq update
&& apt-get -qqy install python3 git ipython screen htop vim octave cmake cmake-curses-gui build-essential g++
cmake cmake-curses-gui bison flex freeglut3 freeglut3-dev libxi6 libxi-dev libxmu6 libxmu-dev libxmu-headers

RUN make && make install

I don’t know pip, but it looks like you can use a requirements file to specify all of the packages. If not, then you can probably add all of those packages on one line like apt-get install.

Also, I believe it’s best practice to use COPY instead of ADD.

Combining all of those will reduce the number of containers created by the Dockerfile build process.

Do you have any insight on how can I ask my Dockerfile to look at python 3 instead of python 2. I know I can manually set that path once I enter the container. But I want to run algorithm without changing python libraries all the time.

Have you tried using the official Python image Docker ? That would be easier than trying to do that all yourself. Other than that, it’s probably best to open a new forum post.

Hope that helps!