When I attempt to build and publish a Docker image to ECR I receive a “no space left on device” error message:
Step 4 : RUN pip install --no-cache-dir uwsgi
---> Running in 44d6a6f5a2f6
Collecting uwsgi
Downloading uwsgi-2.0.14.tar.gz (788kB)
Installing collected packages: uwsgi
Running setup.py install for uwsgi: started
Running setup.py install for uwsgi: finished with status 'done'
Successfully installed uwsgi-2.0.14
Untar re-exec error: exit status 1: output: write /usr/share/perl/5.20.2/Locale/Codes/Currency_Codes.pm: no space left on device
[info] build failed (exit code 1)
I do not understand why I am receiving this error since I have plenty of disk and i-nodes on the system:
this is because you are using the vfs storage driver which makes a full copy of every layer when building your image, potentially consuming huge amounts of disk space. Ideally you should be using aufs or overlay, but to do so you need to make sure your host machines supports these filesystems.
The vfs backend is a very simple fallback that has no copy-on-write support. Each layer is just a separate directory. Creating a new layer based on another layer is done by making a deep copy of the base layer into a new directory.
Since this backend doesn’t share diskspace use between layers, and since creating a new layer is a slow operation this is not a very practical backend. However, it still has its uses, for instance to verify other backends against, or if you need a super robust (if slow) backend that works everywhere.
oh and thanks for providing such a detailed description of your issue and including the docker info. If everyone provided this much detail when asking questions it would make support so much easier
I believe my response to the original question in this thread still applies.
In general, device mapper does not work with the official docker:dind image, which is the base image used by the ecr plugin. Because device mapper is not supported, the docker daemon will fallback to vfs which is not a space efficient driver.
Note that issues with device mapper and fallback to VFS are docker defaults. There is nothing that Drone can do to change this. You would need to install the appropriate drivers (overlay) on your host machine.