apt 镜像问题#2787
https://cnb.cool/wangyuand/cppdev/-/build/logs/cnb-8lg-1jcj29a89
[00:02:48 +0ms] #4 [1/3] FROM docker.io/library/ubuntu:24.04@sha256:c35e29c9450151419d9448b0fd75374fec4fff364a27f176fb458d472dfc9e54 [00:02:48 +0ms] #4 CACHED [00:02:48 +0ms] [00:02:48 +0ms] #5 [2/3] RUN apt-get update && apt-get install -y git wget unzip openssh-server gcc cmake curl && apt-get clean && rm -rf /var/lib/apt/lists/* [00:02:48 +1.2s] #5 1.312 Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB] [00:02:48 +164ms] #5 1.476 Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB] [00:02:48 +1.0s] #5 2.495 Get:3 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [33.1 kB] [00:02:48 +278ms] #5 2.774 Get:4 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1752 kB] [00:02:48 +1.1s] #5 3.893 Get:5 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB] [00:02:48 +1.0s] #5 4.916 Get:6 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB] [00:02:48 +990ms] #5 5.906 Get:7 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [331 kB] [00:02:48 +2.7s] #5 8.589 Get:8 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB] [00:02:48 +178ms] #5 8.617 Get:9 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1183 kB] [00:02:48 +3.6s] #5 12.39 Get:10 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [2898 kB] [00:02:56 +2.6m] #5 166.0 Ign:8 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [00:02:57 +613ms] #5 166.6 Get:11 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages [1808 kB] [00:02:59 +1.7s] #5 168.3 Get:12 http://archive.ubuntu.com/ubuntu noble/restricted amd64 Packages [117 kB] [00:02:59 +203ms] #5 168.5 Get:13 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [35.9 kB] [00:02:59 +197ms] #5 168.7 Ign:14 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [00:02:59 +196ms] #5 168.9 Get:15 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [3056 kB] [00:03:00 +527ms] #5 169.5 Ign:16 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [00:03:00 +138ms] #5 169.6 Get:17 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Packages [49.4 kB] [00:03:00 +197ms] #5 169.8 Get:18 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [34.3 kB] [00:03:00 +238ms] #5 170.0 Get:8 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB] [00:03:02 +1.4s] #5 171.4 Get:14 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1944 kB] [00:03:02 +151ms] #5 171.4 Err:14 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [00:03:02 +0ms] #5 171.4 File has unexpected size (1943621 != 1943947). Mirror sync in progress? [IP: 198.18.0.76 80] [00:03:02 +0ms] #5 171.4 Hashes of expected file: [00:03:02 +0ms] #5 171.4 - Filesize:1943947 [weak] [00:03:02 +0ms] #5 171.4 - SHA256:07c39d173cf7de9b90f281d0b901ab890aae632e1e3fc3d35846bb6893281c08 [00:03:02 +0ms] #5 171.4 - SHA1:dc36cb717addef5ae000d9c5ddb2481cc641364a [weak] [00:03:02 +0ms] #5 171.4 - MD5Sum:718723a91ecce1c40285f08207dd0723 [weak] [00:03:02 +0ms] #5 171.4 Release file created at: Tue, 16 Dec 2025 06:14:27 +0000 [00:03:02 +512ms] #5 172.1 Get:16 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [2125 kB] [00:03:14 +11.4s] #5 183.5 Fetched 17.1 MB in 3min 3s (93.7 kB/s) [00:03:14 +498ms] #5 183.5 Reading package lists... [00:03:14 +112ms] #5 184.0 E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/noble-updates/universe/binary-amd64/Packages.gz File has unexpected size (1943621 != 1943947). Mirror sync in progress? [IP: 198.18.0.76 80] [00:03:14 +1ms] #5 184.0 Hashes of expected file: [00:03:14 +0ms] #5 184.0 - Filesize:1943947 [weak] [00:03:14 +0ms] #5 184.0 - SHA256:07c39d173cf7de9b90f281d0b901ab890aae632e1e3fc3d35846bb6893281c08 [00:03:14 +0ms] #5 184.0 - SHA1:dc36cb717addef5ae000d9c5ddb2481cc641364a [weak] [00:03:14 +0ms] #5 184.0 - MD5Sum:718723a91ecce1c40285f08207dd0723 [weak] [00:03:14 +0ms] #5 184.0 Release file created at: Tue, 16 Dec 2025 06:14:27 +0000 [00:03:14 +0ms] #5 184.0 E: Some index files failed to download. They have been ignored, or old ones used instead. [00:03:14 +0ms] #5 ERROR: process "/bin/sh -c apt-get update && apt-get install -y git wget unzip openssh-server gcc cmake curl && apt-get clean && rm -rf /var/lib/apt/lists/*" di d not complete successfully: exit code: 100 [00:03:14 +20ms] ------ [00:03:14 +0ms] > [2/3] RUN apt-get update && apt-get install -y git wget unzip openssh-server gcc cmake curl && apt-get clean && rm -rf /var/lib/apt/lists/*: [00:03:14 +0ms] 172.1 Get:16 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [2125 kB] [00:03:14 +0ms] [00:03:14 +0ms] 184.0 E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/noble-updates/universe/binary-amd64/Packages.gz File has unexpected size (1943621 != 1943947). Mirror sy nc in progress? [IP: 198.18.0.76 80] [00:03:14 +0ms] 184.0 Hashes of expected file: [00:03:14 +0ms] 184.0 - Filesize:1943947 [weak] [00:03:14 +0ms] 184.0 - SHA256:07c39d173cf7de9b90f281d0b901ab890aae632e1e3fc3d35846bb6893281c08 [00:03:14 +0ms] 184.0 - SHA1:dc36cb717addef5ae000d9c5ddb2481cc641364a [weak] [00:03:14 +0ms] 184.0 - MD5Sum:718723a91ecce1c40285f08207dd0723 [weak] [00:03:14 +0ms] 184.0 Release file created at: Tue, 16 Dec 2025 06:14:27 +0000 [00:03:14 +0ms] 184.0 E: Some index files failed to download. They have been ignored, or old ones used instead. [00:03:14 +0ms] ------ [00:03:14 +0ms] Dockerfile:6 [00:03:14 +0ms] -------------------- [00:03:14 +0ms] 5 | # 安装 ssh 服务,用于支持 VSCode 等客户端通过 Remote-SSH 访问开发环境(也可按需安装其他软件) [00:03:14 +0ms] 6 | >>> RUN apt-get update \ [00:03:14 +0ms] 7 | >>> && apt-get install -y git wget unzip openssh-server gcc cmake curl \ [00:03:14 +0ms] 8 | >>> && apt-get clean \ [00:03:14 +0ms] 9 | >>> && rm -rf /var/lib/apt/lists/* [00:03:14 +0ms] 10 | [00:03:14 +0ms] -------------------- [00:03:14 +0ms] ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y git wget unzip openssh-server gcc cmake curl && apt-get clean && rm -rf /var/lib/a pt/lists/*" did not complete successfully: exit code: 100 [00:03:14 +5ms] exit code: 1, signal: -1
可以切换为 tencent mirrorr 源。 https://cnb.cool/examples/mirrors/mirrors.cloud.tencent.com
妲己
简单描述一下问题和重现方式
https://cnb.cool/wangyuand/cppdev/-/build/logs/cnb-8lg-1jcj29a89