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.

  • Deploy the database to Docker Container microsoft/mssql-server-linux
  • Use public container images on IBM Bluemix
  • Docker SonarQube Qalityprofile
  • how can we make volume as optional in docker compose .yml , how can we mount volume as optional using flag
  • How to mount private SSH key to Docker for Windows container?
  • Docker error: Unable to locate package git
  • 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.

    .

  • Why does Dockerfile RUN print echo options?
  • Single Docker Image with multiple Softwares or Separate images for separate software
  • SSHFS Mount for Docker Container / Node Server needs to access files on an external server
  • Passing variable from container start to file
  • How do I run mysqld as root in the official MySql docker image?
  • How to run Iojs in Docker?
  • 2 Solutions collect form web for “docker and image size limit”

    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.

    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

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.