build立下载大文件的docker镜像失败,错误

我是docker工人。 我已经尝试了不到两个星期。 我们有一个服务,我们想迁移到一个容器。 该服务使用了大约50G的数据,所以我们期望图像非常大。 我们已经为它写了一个Dockerfile。 当我们运行构build它失败与ff:

ApplyLayer exit status 1 stdout: stderr: write /mnt/spine_features/spine_features_subset.lmdb/data.mdb: input/output error 

当我们检查docker ps -a的容器时,我们可以看到构build容器列出状态:

 Exited (1) About a minute ago 

当我们尝试提交容器时,我们得到相同的错误:

 Error response from daemon: ApplyLayer exit status 1 stdout: stderr: write /mnt/spine_features/spine_features_subset.lmdb/data.mdb: input/output error 

我们也可以通过docker检查容器。 当我们排除下载最大的文件时,我们能够完成构build服务映像。 是否有某种configuration可以改变成功,同时还包括更大的文件?

docker版本

 Client: Version: 1.12.1 API version: 1.24 Go version: go1.7 Git commit: 23cf638 Built: Fri Aug 19 02:03:02 2016 OS/Arch: linux/amd64 Server: Version: 1.12.1 API version: 1.24 Go version: go1.7 Git commit: 23cf638 Built: Fri Aug 19 02:03:02 2016 OS/Arch: linux/amd64 

docker信息

 Containers: 2 Running: 0 Paused: 0 Stopped: 2 Images: 22 Server Version: 1.12.1 Storage Driver: devicemapper Pool Name: docker-8:2-7603782-pool Pool Blocksize: 65.54 kB Base Device Size: 214.7 GB Backing Filesystem: xfs Data file: /dev/loop0 Metadata file: /dev/loop1 Data Space Used: 67.78 GB Data Space Total: 107.4 GB Data Space Available: 39.59 GB Metadata Space Used: 37.04 MB Metadata Space Total: 2.147 GB Metadata Space Available: 2.11 GB Thin Pool Minimum Free Space: 10.74 GB Udev Sync Supported: true Deferred Removal Enabled: false Deferred Deletion Enabled: false Deferred Deleted Device Count: 0 Data loop file: /var/lib/docker/devicemapper/devicemapper/data WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device. Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata Library Version: 1.02.134 (2016-09-07) Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: null host bridge overlay Swarm: inactive Runtimes: runc Default Runtime: runc Security Options: seccomp Kernel Version: 4.7.4-1-ARCH Operating System: Arch Linux OSType: linux Architecture: x86_64 CPUs: 12 Total Memory: 15.58 GiB Name: mega-haro ID: MDQ5:JIT3:BVQX:XYO6:YTXI:HTRE:N2UQ:ML4V:ENIE:DDCO:ZGYF:3P5F Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Insecure Registries: misty:5000 127.0.0.0/8 

正如Haoming Zhang所build议的,将主机目录安装到容器中是一个可以接受的解决scheme。 我们还在探索使用FUSE在运行时将数据加载到容器中的可能性,而不是在构build过程中将其映射到映像中,或者在容器运行时让主机将其传递到容器中。