码头工人和图像大小限制 [英] docker and image size limit

查看:103
本文介绍了码头工人和图像大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在这里和其他网站上阅读了很多有关此问题的内容,但是我没有设法找到适当的解决方案来增加默认设置为10GB的图片大小限制。

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.

一些背景信息。

我正在构建一个docker容器:
https://bitbucket.org/efestolab/docker-buildgaffer

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

在centos映像之上下载并构建一致的库集。 (花费大量的时间和空间来构建)

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版本:

Docker version 1.7.1, build 786b29d

Docker信息:

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

在停止服务并取消锁定之后/ var / lib / docker文件夹
我已经通过docker启动脚本进行了更新

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

/lib/systemd/system/docker.service

具有以下标志:

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

并重新启动docker服务,但仍然失败,并出现相同的错误。

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

我也一直在阅读这可能是由于我所依赖的原始图像(centos:6)所致,该图像可能已限制为10GB。

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.

所以我重建centos6图像,并将其用作我的基础,但是我确实遇到了相同的错误。

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

任何人都有可靠的方法使我能够完全构建此docker映像?

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.

感谢您的任何回复或建议!
L。

Thanks for any reply or suggestions ! L.

推荐答案

感谢在@ user2915097的测试中,我一直在更新内核版本3.16.0,安装了内核Extras,然后删除并重新安装了docker。
这个问题似乎是devicemapper可以解决的,现在我得到的docker命令没有任何变化:

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

它最终生成的图像大于10GB。
L。

and it finally builds images > 10GB. L.

这篇关于码头工人和图像大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆