在其中创建包含MongoDB的Docker容器时出错

时间:2014-04-08 18:43:06

标签: mongodb docker

我目前正在使用最近安装的Ubuntu 13.10。我跟随Docker关于如何使用MongoDB(here)创建容器的教程,我认为在安装ubuntu软件包时遇到错误,我认为。

Uploading context 3.584 kB
Uploading context 
Step 0 : FROM ubuntu
 ---> 9cd978db300e
Step 1 : RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
 ---> Using cache
 ---> cc932e587df1
Step 2 : RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list
 ---> Using cache
 ---> 75b574928960
Step 3 : RUN dpkg-divert --local --rename --add /sbin/initctl
 ---> Using cache
 ---> 25957a72b9a3
Step 4 : RUN ln -nfs /bin/true /sbin/initctl
 ---> Using cache
 ---> 1319f6eba042
Step 5 : RUN apt-get update
 ---> Running in a59cb8167517
Get:1 http://archive.ubuntu.com precise InRelease [593 B]
Ign http://archive.ubuntu.com precise InRelease
Ign http://downloads-distro.mongodb.org dist InRelease
Get:2 http://archive.ubuntu.com precise-updates InRelease [593 B]
Ign http://archive.ubuntu.com precise-updates InRelease
Get:3 http://archive.ubuntu.com precise-security InRelease [593 B]
Ign http://archive.ubuntu.com precise-security InRelease
Get:4 http://downloads-distro.mongodb.org dist Release.gpg [490 B]
Get:5 http://archive.ubuntu.com precise/main amd64 Packages/DiffIndex [593 B]
Get:6 http://archive.ubuntu.com precise/universe amd64 Packages/DiffIndex [593 B]
Get:7 http://downloads-distro.mongodb.org dist Release [2032 B]
Get:8 http://archive.ubuntu.com precise/main i386 Packages/DiffIndex [593 B]
Get:9 http://archive.ubuntu.com precise/universe i386 Packages/DiffIndex [593 B]
Get:10 http://downloads-distro.mongodb.org dist/10gen amd64 Packages [14.3 kB]
Get:11 http://archive.ubuntu.com precise-updates/main amd64 Packages/DiffIndex [593 B]
Get:12 http://archive.ubuntu.com precise-updates/universe amd64 Packages/DiffIndex [593 B]
Get:13 http://archive.ubuntu.com precise-updates/main i386 Packages/DiffIndex [593 B]
Get:14 http://downloads-distro.mongodb.org dist/10gen i386 Packages [14.4 kB]
Get:15 http://archive.ubuntu.com precise-updates/universe i386 Packages/DiffIndex [593 B]
Get:16 http://archive.ubuntu.com precise-security/main amd64 Packages/DiffIndex [593 B]
Get:17 http://archive.ubuntu.com precise-security/universe amd64 Packages/DiffIndex [593 B]
Get:18 http://archive.ubuntu.com precise-security/main i386 Packages/DiffIndex [593 B]
Get:19 http://archive.ubuntu.com precise-security/universe i386 Packages/DiffIndex [593 B]
Get:20 http://archive.ubuntu.com precise/main amd64 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:21 http://archive.ubuntu.com precise/universe amd64 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:22 http://archive.ubuntu.com precise/main i386 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:23 http://archive.ubuntu.com precise/universe i386 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:24 http://archive.ubuntu.com precise-updates/main amd64 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:25 http://archive.ubuntu.com precise-updates/universe amd64 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:26 http://archive.ubuntu.com precise-updates/main i386 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:27 http://archive.ubuntu.com precise-updates/universe i386 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:28 http://archive.ubuntu.com precise-security/main amd64 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:29 http://archive.ubuntu.com precise-security/universe amd64 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:30 http://archive.ubuntu.com precise-security/main i386 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
Get:31 http://archive.ubuntu.com precise-security/universe i386 Packages [593 B]
bzip2: (stdin) is not a bzip2 file.
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
/usr/bin/xz: (stdin): File format not recognized
Fetched 47.2 kB in 9s (5203 B/s)
W: GPG error: http://archive.ubuntu.com precise InRelease: File /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_InRelease doesn't start with a clearsigned message
W: GPG error: http://archive.ubuntu.com precise-updates InRelease: File /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-updates_InRelease doesn't start with a clearsigned message
W: GPG error: http://archive.ubuntu.com precise-security InRelease: File /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-security_InRelease doesn't start with a clearsigned message
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-amd64_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-updates_universe_binary-amd64_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-updates_universe_binary-i386_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-security_main_binary-amd64_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-security_universe_binary-amd64_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-security_main_binary-i386_Packages  Encountered a section with no Package: header

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise-security_universe_binary-i386_Packages  Encountered a section with no Package: header

E: Some index files failed to download. They have been ignored, or old ones used instead.
2014/04/08 19:00:28 The command [/bin/sh -c apt-get update] returned a non-zero code: 100

之前有人看过这个错误吗?

1 个答案:

答案 0 :(得分:0)

您的互联网连接有问题吗? apt-get update命令失败。

如果您只需要容器上的mongoDB,可以执行docker run mongo,它将下载并运行官方的mongoDB映像。