Docker无法获取deb.debian.org大小不匹配

Docker无法获取deb.debian.org大小不匹配,docker,Docker,我正在使用Docker Desktop for Windows。我正在尝试运行命令docker build-t dtr.server.com/test/jenkins build agent ui:abc123。但我遇到了一个错误 E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/a/apt/apt-utils_1.0.9.8.5_amd64.deb Siz e mismatch E

我正在使用Docker Desktop for Windows。我正在尝试运行命令
docker build-t dtr.server.com/test/jenkins build agent ui:abc123。
但我遇到了一个错误

E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/a/apt/apt-utils_1.0.9.8.5_amd64.deb  Siz
e mismatch

E: Failed to fetch http://deb.debian.org/debian/pool/main/a/apt/apt-transport-https_1.0.9.8.4_amd64.deb  Size mismatch

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/pinentry/pinentry-gtk2_0.8.3-2_amd64.deb  Size mismatch

E: Failed to fetch http://deb.debian.org/debian/pool/main/g/gnupg2/gnupg-agent_2.0.26-6+deb8u2_amd64.deb  Size mismatch

E: Failed to fetch http://deb.debian.org/debian/pool/main/g/gnupg2/gnupg2_2.0.26-6+deb8u2_amd64.deb  Size mismatch

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-apt/python3-apt_0.9.3.12_amd64.deb  Size mismatch

E: Failed to fetch http://deb.debian.org/debian/pool/main/d/dbus-python/python3-dbus_1.2.0-2+b3_amd64.deb  Size mismatch

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/pygobject/python3-gi_3.14.0-1_amd64.deb  Size mismatch

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/bash -o pipefail -c apt-get update &&     apt-get -y install --no-install-recommends     apt-transport
-https=1.0.9.8.4     gnupg2=2.0.26-6+deb8u2     software-properties-common=0.92.25debian1     && rm -rf /var/lib/apt/lis
ts/*' returned a non-zero code: 100

我的Docker版本是18.09.2。

这可能与a有关(如果您在主机上的代理后面,并且没有)

作为:

这种情况有时会发生在同步文件或某个文件的中间,并且散列总数在远程上还没有完全更新。 正如错误所说,镜像同步可能正在进行中


请尝试删除
/var/cache/apt/archives/partial
文件夹,然后重试。但首先检查代理是否允许下载任何内容。

这正与代理问题有关。我请求它允许我通过代理访问,问题就解决了。