我正在尝试从安装Java 8的Ubuntu 14.04构建一个基本的Docker镜像.这是我到目前为止所拥有的:
FROM ubuntu:14.04
MAINTAINER Me Myself
当我运行docker build -t memyself / docker_sample时.我在安装Java时遇到以下错误:
myuser@mymachine:~/sandBox/workspace/docker_sample$docker build -t memyself/docker_sample .
Sending build context to Docker daemon 127.1 MB
Step 0 : FROM ubuntu:14.04
---> 91e54dfb1179
Step 1 : MAINTAINER Me Myself
知道我哪里出错了?
更新:
我添加了apt-get install -y software-properties-common行,现在我得到了大量的输出,其中一些是:
162816K ........ ........ ........ ........ ........ ........ 93% 3.92M 2s
165888K ........ ........ ........ ........ ........ ........ 95% 5.43M 1s
168960K ........ ........ ........ ........ ........ ........ 97% 6.35M 1s
172032K ........ ........ ........ ........ ........ ........ 98% 6.09M 0s
175104K ........ ........ ........ ..... 100% 5.27M=32s
2015-09-25 15:33:33 (5.43 MB/s) - 'jdk-8u60-linux-x64.tar.gz' saved [181238643/181238643]
Download done.
Removing outdated cached downloads...
tar: jdk1.8.0_60/jre/lib/charsets.jar: Wrote only 3072 of 10240 bytes
tar: jdk1.8.0_60/jre/lib/jce.jar: Cannot write: No space left on device
tar: jdk1.8.0_60/jre/lib/amd64/libbci.so: Cannot write: No space left on device
tar: jdk1.8.0_60/jre/lib/amd64/libjavafx_font_freetype.so: Cannot write: No space left on device
tar: jdk1.8.0_60/jre/lib/amd64/libawt_headless.so: Cannot write: No space left on device
tar: jdk1.8.0_60/jre/lib/amd64/libdt_socket.so: Cannot write: No space left on device
tar: jdk1.8.0_60/jre/lib/amd64/libmlib_image.so: Cannot write: No space left on device
...Huge amount of output omitted for brevity...
tar: jdk1.8.0_60/bin/jvisualvm: Cannot write: No space left on device
tar: jdk1.8.0_60/bin/jcontrol: Cannot write: No space left on device
tar: jdk1.8.0_60/release: Cannot write: No space left on device
tar: Exiting with failure status due to prevIoUs errors
cannot unpack jdk8
Oracle JDK 8 is NOT installed.
debconf: DbDriver "config": could not write /var/cache/debconf/config.dat-new: No space left on device
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up gsfonts (1:8.11+urwcyr1.0.7~pre44-4.2ubuntu1) ...
dpkg: unrecoverable fatal error,aborting:
unable to flush /var/lib/dpkg/updates/tmp.i after padding: No space left on device
E: Sub-process /usr/bin/dpkg returned an error code (2)
重要的是要注意,如果我尝试在我的Mac上启动多个其他图像(从Docker Hub中提取),我会得到类似的“设备上没有空间”错误.所以我认为这个最新的问题可能是由于没有为我的机器上的Docker分配足够的空间(类似于JVM OutOfMemoryException问题).
最佳答案
原文链接:https://www.f2er.com/docker/436788.html