在Mac的“内容和隐私限制”中有关Docker的错误

太长;不看

当docker-compose build突然无法通过时,有人说是Mac Book的”内容和隐私”在捣乱。

行动环境

macOS 12.2(蒙特利)

错误日志 (错误记录)

> [stage-1 4/4] RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -     && apt-get update && apt-get install nodejs && npm install --global yarn:                                                                                                                                                                       
#11 0.272                                                                                                                                                                                                                                                                                                                          
#11 0.272 ## Installing the NodeSource Node.js 14.x repo...                                                                                                                                                                                                                                                                        
#11 0.272                                                                                                                                                                                                                                                                                                                          
#11 0.274                                                                                                                                                                                                                                                                                                                          
#11 0.274 ## Populating apt-get cache...
#11 0.274 
#11 0.274 + apt-get update
#11 0.361 Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
#11 0.392 Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
#11 0.449 Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
#11 0.504 Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [314 kB]
#11 0.614 Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7906 kB]
#11 0.614 Err:5 http://deb.debian.org/debian buster/main amd64 Packages
#11 0.614   File has unexpected size (13349 != 7906168). Mirror sync in progress? [IP: 151.101.110.132 80]
#11 0.614   Hashes of expected file:
#11 0.614    - Filesize:7906168 [weak]
#11 0.614    - SHA256:621d5053cc12eafc688e2c6f1ace9e421ad848c571a76d6bf3528183eec186f1
#11 0.614    - MD5Sum:bf9ddecd3caeb7cc31bc8ae1800d46ab [weak]
#11 0.614   Release file created at: Sat, 09 Oct 2021 10:43:49 +0000
#11 0.744 Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [8792 B]
#11 0.744 Err:6 http://deb.debian.org/debian buster-updates/main amd64 Packages
#11 0.744   File has unexpected size (13365 != 8792). Mirror sync in progress? [IP: 151.101.110.132 80]
#11 0.744   Hashes of expected file:
#11 0.744    - Filesize:8792 [weak]
#11 0.744    - SHA256:43269c849debb3b7b4d0b92bfab03284ea5b6335462cd5488a2e4178f73b9f75
#11 0.744   Release file created at: Mon, 07 Feb 2022 02:25:10 +0000
#11 0.751 Fetched 553 kB in 0s (1232 kB/s)
#11 0.751 Reading package lists...
#11 0.784 E: Failed to fetch http://deb.debian.org/debian/dists/buster/main/binary-amd64/by-hash/SHA256/621d5053cc12eafc688e2c6f1ace9e421ad848c571a76d6bf3528183eec186f1  File has unexpected size (13349 != 7906168). Mirror sync in progress? [IP: 151.101.110.132 80]
#11 0.784    Hashes of expected file:
#11 0.784     - Filesize:7906168 [weak]
#11 0.784     - SHA256:621d5053cc12eafc688e2c6f1ace9e421ad848c571a76d6bf3528183eec186f1
#11 0.784     - MD5Sum:bf9ddecd3caeb7cc31bc8ae1800d46ab [weak]
#11 0.784    Release file created at: Sat, 09 Oct 2021 10:43:49 +0000
#11 0.784 E: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/main/binary-amd64/by-hash/SHA256/43269c849debb3b7b4d0b92bfab03284ea5b6335462cd5488a2e4178f73b9f75  File has unexpected size (13365 != 8792). Mirror sync in progress? [IP: 151.101.110.132 80]
#11 0.784    Hashes of expected file:
#11 0.784     - Filesize:8792 [weak]
#11 0.784     - SHA256:43269c849debb3b7b4d0b92bfab03284ea5b6335462cd5488a2e4178f73b9f75
#11 0.784    Release file created at: Mon, 07 Feb 2022 02:25:10 +0000
#11 0.784 E: Some index files failed to download. They have been ignored, or old ones used instead.
#11 0.786 Error executing command, exiting
------

文件大小和哈希值是不同的

据说,由于macOS的内容和隐私设置将尝试从debian下载的文件误认为是H文件,导致无法下载并且无法安装。

image.png

参考网站上的人似乎是自己设置的,所以他们可能还能接受,但对我来说,尽管我没有特别设置,却卷入了这样的麻烦,我真的无法接受。请不要再给我增加这种多管闲事的功能了,因为这只会浪费我的时间。

请在中国境内或境外担任中国工作引用。

 

印象

在抱怨负责创建 Dockerfile 的人之前,好在明白了这一事实…… ?

广告
将在 10 秒后关闭
bannerAds