描述:
docker build -f server3d.dockerfile . -t rcss3d/rcssserver3d:latest --no-cache
E: Failed to fetch http://172.18.7.250/files/31720000019B085F/ftp.debian.org/debian/pool/main/f/fonts-dejavu/fonts-dejavu-core_2.37-1_all.deb File has unexpected size (1068028 != 1040712). Mirror sync in progress? [IP: 172.18.7.250 80]
Hashes of expected file:
- SHA256:f2b3f7f51e23e0493e8e642c82003fe75cf42bc95fda545cc96b725a69adb515
- SHA1:15970026c98abf7a150d20697aa16d10d72740ba [weak]
- MD5Sum:be036b423d84ce26700dacdbdcddf7b5 [weak]
- Filesize:1040712 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Ubuntu 16.04.6
使用 Docker 版本 19.03.4,构建 9013bf583a(问题可能与平台无关?)apt update
首先替换我的 source.list
用更好的一个,只是错误一样。 --no-cache
构建 docker 镜像选项,它也不起作用。 嗯,这只是一个奇怪的问题,没有大问题......
但它总是出现并让我感到困惑。
最佳答案
我用 docker-compose
但我认为它可能会有所帮助:
apt-get update
到您的 Dockerfile:ENV DEBIAN_FRONTEND noninteractive
...
RUN apt-get update --fix-missing
docker-compose build --no-cache %container_name%
关于docker - apt 更新无法获取,构建 Docker 镜像时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58642988/