试图建立我自己的码头工人,遇到一点问题,这是日志 我正在关注Docker的教程。
FROM docker/whalesay:lateset
RUN apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortune -a | cowsay
这发生在RUN apt-get ...
之后W: Size of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_source_Sources.gz is not what the server reported 213537 7925687
W: Size of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages.gz is not what the server reported 11688 7588885
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/restricted/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/universe/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/restricted/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/universe/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/universe/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/universe/binary-amd64/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案 0 :(得分:1)
在apt-get update
:
sudo rm -rf /var/lib/apt/lists/*
答案 1 :(得分:0)
你的空间已经用完了。或者更确切地说,已经超出了专用于码头资产的空间量。
试试这个(在主机上):
$ docker rmi $(docker images -q)
答案 2 :(得分:0)
在apt-get clean
解决我的问题之前添加apt-get update
。你可以尝试一下。
Dockerfile应如下所示:
FROM docker/whalesay:latest
RUN apt-get clean && apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortune -a | cowsay