攻城獅
Not a programmer 不工程的攻城獅

Follow

Not a programmer 不工程的攻城獅

Follow

Debug Note - macOS run apt-get failed in docker

Thank iCloud Private Relay made this article. Cannot connect to debian.org via HTTP

攻城獅's photo
攻城獅
·Feb 23, 2022·
Play this article

I got an issue while I tried to use docker to build a PHP image. But it failed and the terminal showed the error log below.

截圖 2022-02-23 13.12.03.png

While I saw the error, the first thought in my mind was network might be blocked by anti-virus software or firewall. Then I checked the setting, it was normal. Then I found this issue comment. But it was still not working. However, it seemed an issue about the source.list.

I found the security.debian.org in source.list was different from others. It was a http:// and other domains were https://. So I change the security.debian.org to https://. It worked! But why?

I could understand why I need to connect via https. I keep researching. Therefore I found the answer from this comment.

The answer is -- macOS new feature iCloud Private Relay caused this issue.

Three small. Nice mac.
This is the journey I solve this issue.

 
Share this