'docker and image size limit

I've been reading a lot about this issue in here and other websites, but I haven't manage to find a proper solution on how to increase the images size limit which is set to 10GB by default.

A bit of background informations.

I'm building a docker container: https://bitbucket.org/efestolab/docker-buildgaffer

Which download and builds a consistent set of libraries on top of a centos image. (takes a horrible amount of time and space to build)

The problem is that every single time I try to build it I hit this error :

No space left on device

Docker version:

Docker version 1.7.1, build 786b29d

Docker Info :

Containers: 1
Images: 76
Storage Driver: devicemapper
Pool Name: docker-8:7-12845059-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 11.28 GB
Data Space Total: 107.4 GB
Data Space Available: 96.1 GB
Metadata Space Used: 10.51 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.137 GB
Udev Sync Supported: false
Deferred Removal Enabled: false
Data loop file: /home/_varlibdockerfiles/devicemapper/devicemapper/data
Metadata loop file: /home/_varlibdockerfiles/devicemapper/devicemapper/metadata
Library Version: 1.02.82-git (2013-10-04)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.15.9-031509-generic
Operating System: Ubuntu 14.04.2 LTS
CPUs: 8
Total Memory: 15.58 GiB
Name: hdd-XPS-15-9530
ID: 2MEF:IYLS:MCN5:AR5O:6IXJ:3OB3:DGJE:ZC4N:YWFD:7AAB:EQ73:LKXQ
Username: efesto
Registry: https://index.docker.io/v1/
WARNING: No swap limit support

After stopping the service and nuking the /var/lib/docker folder, I've been updating by docker startup script

/lib/systemd/system/docker.service

with these flags :

ExecStart=/usr/bin/docker -d --storage-opt dm.basesize=20G --storage-opt dm.loopdatasize=256G -H fd:// $DOCKER_OPTS

and restarted docker service, but still fails with the same error.

I've also been reading that might be due to the original image I'm rely on (centos:6), which might have been built with 10GB limit.

So I rebuild the centos6 image, and used that as base for mine, but I did hit the same error.

Does anyone have a reliable way to make me able to build this docker image fully ?

If there's any other informations which might be useful, just feel free to ask.

Thanks for any reply or suggestions ! L.



Solution 1:[1]

Thanks to the test of @user2915097, I've been updating kernel version 3.16.0, installed the kernel extras, and removed and re installed docker. the problem seems to be addressable to devicemapper, now without any change in the docker command I get:

Containers: 0
Images: 94
Storage Driver: aufs
 Root Dir: /home/_varlibdockerfiles/aufs
 Backing Filesystem: extfs
 Dirs: 94
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.16.0-45-generic
Operating System: Ubuntu 14.04.3 LTS
CPUs: 8
Total Memory: 15.58 GiB
Name: hdd-XPS-15-9530
ID: 2MEF:IYLS:MCN5:AR5O:6IXJ:3OB3:DGJE:ZC4N:YWFD:7AAB:EQ73:LKXQ
Username: efesto
Registry: https://index.docker.io/v1/
WARNING: No swap limit support

and it finally builds images > 10GB. L.

Solution 2:[2]

after modifing the docker daemon startup parameters do the following

systemctl daemon-reload
systemctl stop docker
rm -rf /var/lib/docker/*
systemctl start docker

This will remove all your images, make sure you save them before

eg docker save -o something.tar.gz image_name

and reload them after starting docker

eg docker load -i something.tar.gz

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 hdd
Solution 2 jbg