LoginSignup
1
0

More than 1 year has passed since last update.

dockerエラーとmacの「コンテンツとプライバシー制限」

Last updated at Posted at 2022-02-07

tl; dr

docker-compose build がいきなり通らなくなったと思ったら、Mac Bookの「コンテンツとプライバシー」が悪さをしていたという話。

動作環境

macOS 12.2(Monterey)

エラーログ

> [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作った人にクレームつける前に分かって良かったよ…… 😓

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0