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.
hdd
Updated on April 22, 2022Comments
-
hdd about 2 years
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.
-
user2915097 almost 9 yearsI have been unable to find your Dockerfile in your various links, where is it?
-
Henrik Sachse almost 9 yearsCouldn't it be the case that simply your disk is full? I mean the disk where the docker daemon runs? Your
docker info
says:Data Space Total: 107.4 GB
-
hdd almost 9 yearsHi @user2915097, here is the docker file : bitbucket.org/efestolab/docker-buildgaffer/src/…
-
hdd almost 9 yearsHi @h3nrik, thought the same a the beginning, but there's plenty of space available. (note, /var/lib/docker has been symlinked to the /home partition for more space as well.) here you can see that is the image not going over 10Gb:
code
<none> <none> 9dbd4ea10477 19 hours ago 9.825 GBcode
-
user2915097 almost 9 yearsThe last 2 lines of your Dockerfile are strange
VOLUME /$OUT_FOLDER CMD cp -Rf -v /opt/* /$OUT_FOLDER && bash
usually, the last line of a Dockerfile is either a CMD or ENTRYPOINT my_executable -
hdd almost 9 years@user2915097 correct, usually is CMD or ENTRYPOINT, but in this case, there's no point of using these, as it doesn't have to run anything once built. it only has to drop on the host disk the built libraries.
-
user2915097 almost 9 yearsI have launched a
docker build -t mytag .
with your Dockerfile, waiting for completion -
hdd almost 9 yearsWill be taking hours to break as it has to get to 10GB, be ready to wait. Thanks.
-
hdd almost 9 years@user2915097: hang on. master will be building without problem as stays under 10Gb. Use branch Applications: bitbucket.org/efestolab/docker-buildgaffer/src/… it will be breaking half way through building cortex : bitbucket.org/efestolab/docker-buildgaffer/src/…
-
user2915097 almost 9 yearsby the way, try to reduce the number of RUN in your Dockerfile
-
hdd almost 9 yearsIt should be building bigger intermediate containers, as far as I understand. RUN commands are kept it in a way that if something breaks during a build, the container remain in a consistent state , eg: source file will have to be decompressed , configured and built.
-
user2915097 almost 9 yearsI have built successfully the previous Dockerfile, the image has a size of 9,65 Gb, I am building the other
-
user2915097 almost 9 yearsbuilt successfully, size 13,99 GB
-
hdd almost 9 yearsOk this is good, how did you manage?
-
user2915097 almost 9 yearsnothing special, just did
docker build -t gaffer1 .
and got at the endStep 90 : VOLUME /$OUT_FOLDER ---> Running in 5bc5bfb236a8 ---> b641fdd75aaf Removing intermediate container 5bc5bfb236a8 Step 91 : CMD cp -Rf -v /opt/* /$OUT_FOLDER && bash ---> Running in 7a4ea27e74f9 ---> c5af0805fcb6 Removing intermediate container 7a4ea27e74f9 Successfully built c5af0805fcb6
My host is Ubuntu 14.04 64 bits, my docker version is 1.8.0-rc3 -
user2915097 almost 9 years
docker images gaffer1 REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE gaffer1 latest c5af0805fcb6 12 hours ago 13.99 GB
-
hdd almost 9 yearsCould you post your Docker info?
-
user2915097 almost 9 yearshere it is
docker info Containers: 79 Images: 1617 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 1777 Dirperm1 Supported: false Execution Driver: native-0.2 Logging Driver: json-file Kernel Version: 3.13.0-53-generic Operating System: Ubuntu 14.04.3 LTS CPUs: 8 Total Memory: 7.72 GiB Name: gg-P15SM-A-SM1-A ID: 227E:JM7R:FRAA:PTTY:PG2U:XNJU:ZCDD:JO5C:IN3Y:SJXU:HASA:6NLI Username: k3ck3c Registry: https://index.docker.io/v1/ WARNING: No swap limit support
-
hdd almost 9 yearsAufs might be the answer at this issue?
-
hdd almost 9 yearsThanks for the tests.
-
-
Ender over 7 yearsI'm also running into this. Any chance of showing the actual fix?
-
hdd over 7 yearsHi sorry for the delay, there's no real actual fix, just to update the kernel version, and reinstalled docker. That was it, I had an old version.