惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
S
Schneier on Security
S
Securelist
酷 壳 – CoolShell
酷 壳 – CoolShell
C
CXSECURITY Database RSS Feed - CXSecurity.com
Cyberwarzone
Cyberwarzone
Apple Machine Learning Research
Apple Machine Learning Research
S
SegmentFault 最新的问题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
GbyAI
GbyAI
Security Latest
Security Latest
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
Webroot Blog
Webroot Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
C
Cisco Blogs
博客园 - 【当耐特】
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
B
Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Attack and Defense Labs
Attack and Defense Labs
The Last Watchdog
The Last Watchdog
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Project Zero
Project Zero
WordPress大学
WordPress大学
L
LINUX DO - 最新话题
F
Fortinet All Blogs
L
LINUX DO - 热门话题
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MongoDB | Blog
MongoDB | Blog
Latest news
Latest news
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
The Hacker News
The Hacker News
爱范儿
爱范儿
O
OpenAI News
J
Java Code Geeks
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More

Java不加糖的Blog

假设, AI 把我代替的那一刻真的到来 | szhshp 的第三边境研究所 小傻瓜都能懂的 AstrBot QQ 机器人集成 MCP 功能实战指南 | szhshp 的第三边境研究所 《智人之上: 从石器时代到 AI 时代的信息网络简史》阅读笔记 | szhshp 的第三边境研究所 iPadOS 26 无法设置空间场景图片壁纸的解决方法 | szhshp 的第三边境研究所 《一路云海》(终) | szhshp 的第三边境研究所 《一路云海》(四): 如何不按套路旅行 | szhshp 的第三边境研究所 《一路云海》(三): In Ya Mellow Tone | szhshp 的第三边境研究所 《一路云海》(二): 关西世博参观纪实 | szhshp 的第三边境研究所 《一路云海》(一): 新的征程 | szhshp 的第三边境研究所 2025 大阪世博会 [ 3 天前-先到先得 ] 阶段 场馆预约必中独家攻略 | szhshp 的第三边境研究所 Hackathon 随想 | szhshp 的第三边境研究所 一杯双皮奶 | szhshp 的第三边境研究所 Armbian + CasaOS + NAS 配置指南 | szhshp 的第三边境研究所 Disqus RIP! 论过高的维护成本如何治疗固执的坏习惯 | szhshp 的第三边境研究所 炸弹猫桌游变体规则 | szhshp 的第三边境研究所 《小岛经济学》阅读笔记 | szhshp 的第三边境研究所 《金钱心理学》阅读笔记 | szhshp 的第三边境研究所 为知笔记 RIP: 迁移剩余的笔记 | szhshp 的第三边境研究所 2025 博客第十年展望 - 再见我的过去 | szhshp 的第三边境研究所 我在独立游戏里面致敬的作品 | szhshp 的第三边境研究所 《How to make thing faster》阅读笔记 | szhshp 的第三边境研究所 《The Art of Clean Code》阅读笔记 | szhshp 的第三边境研究所 《Clean Architecture: A Craftsman Guide to Software Structure and Design》阅读笔记 | szhshp 的第三边境研究所 《How AI Works》阅读笔记 | szhshp 的第三边境研究所 游戏策划废案 - Project Uranus | szhshp 的第三边境研究所 游戏策划废案 - Project X | szhshp 的第三边境研究所 人生第一款独立游戏开发复盘 | szhshp 的第三边境研究所 Trap of Life | szhshp 的第三边境研究所 wireguard折腾记录 DSB in SBG 如果我用手搓了个暗物质雏形 | szhshp 的第三边境研究所 ODE常微分方程总结 《Rust Programming Language》- EX - Cheatsheet | szhshp 的第三边境研究所 新的播放器上线了 | szhshp 的第三边境研究所 Cypress - End-to-End Testing: OKTA Authentication with MFA | szhshp 的第三边境研究所 Windows分应用跳过管理员弹窗 docker配置wikijs VSC x VIM - 反正多学几个快捷键没有坏处 | szhshp 的第三边境研究所 使用socket代理解决企业微信可信ip问题 PowerShell美化 Kaggle比赛RSNA-2022骨折检测 CloudComPy库安装 Pandas的数据操作 齐次坐标系的理解 NgeNet论文理解 2023年必装的Windows软件 两小时 Docker 速成 - Getting Started | szhshp 的第三边境研究所 《The Joy of Javascript》- 5 - Data | szhshp 的第三边境研究所 《The Joy of Javascript》- 4 - Meta Programming | szhshp 的第三边境研究所 《The Joy of Javascript》- 3 - ADT(Algebraic Data Type) | szhshp 的第三边境研究所 Web-Automation Testing | szhshp 的第三边境研究所 《The Joy of Javascript》- 2 - Functor/Monad | szhshp 的第三边境研究所 《The Joy of Javascript》- 1 - Object/Function | szhshp 的第三边境研究所 EvalError: Possible side-effect in debug-evaluate | szhshp 的第三边境研究所 前端 QA 工具链指南 - husky,commitlint,commitizen,eslint,typescript,express | szhshp 的第三边境研究所 效率工具 & 软件推荐 | szhshp 的第三边境研究所 站点开源 Project Titan | szhshp 的第三边境研究所 cmd/powershell-命令速查-Cheatsheet | szhshp 的第三边境研究所 Git-命令速查与相关问题解决-Cheatsheet & Troubleshooting | szhshp 的第三边境研究所 Tailwind.css not included in NextJS Production | szhshp 的第三边境研究所 Github GraphQL API - Data Integration | szhshp 的第三边境研究所 尝试 Windows Terminal + z.lua | szhshp 的第三边境研究所 StrokePlus.net - Powerful Hotkey Boost | szhshp 的第三边境研究所 优雅地 Hack 一台黑苹果 | szhshp 的第三边境研究所 一杯关东煮 | szhshp 的第三边境研究所 Gitee x PicGo 管理图床 | szhshp 的第三边境研究所 Create Your Own Redux (Typescript) | szhshp 的第三边境研究所 Getting Started: Ionic + Capacitor + React + Typescript + Android | szhshp 的第三边境研究所 GraphQL: File Upload & Troubleshooting | szhshp 的第三边境研究所 吉祥航空随心飞刷票工具循环查票工具 | szhshp 的第三边境研究所 NVM Windows Portable Installation | szhshp 的第三边境研究所 NextJS x Typescript - Integration & Troubleshooting | szhshp 的第三边境研究所 全站点升级 - Project Titan | szhshp 的第三边境研究所 AWS-EC2-常见问题解决-Troubleshooting | szhshp 的第三边境研究所 Workbox-Getting Started | szhshp 的第三边境研究所 《时间简史》阅读笔记 | szhshp 的第三边境研究所 《时间的秩序》阅读笔记 | szhshp 的第三边境研究所 ESLint-常见问题解决-Troubleshooting | szhshp 的第三边境研究所 站点索引 | szhshp 的第三边境研究所 个人知识库搭建 - Hexo 实现 Github/Coding 持续集成 | szhshp 的第三边境研究所 BMOB-常见问题解决-Troubleshooting | szhshp 的第三边境研究所 React + Typescript: 开启 HMR/Hot Loader | szhshp 的第三边境研究所 Yarn & NPM | szhshp 的第三边境研究所 ESLint: Typescript + React + TSX 集成 | szhshp 的第三边境研究所 《10101》EP15:过年 2020 | szhshp 的第三边境研究所 Cmder-Usage | szhshp 的第三边境研究所 Redux-DOM not refreshed | szhshp 的第三边境研究所 React Semantic UI-CheatSheet | szhshp 的第三边境研究所 Typescript: Getting Started | szhshp 的第三边境研究所 Flutter-Getting Started | szhshp 的第三边境研究所 Typescript: Access window object with type check | szhshp 的第三边境研究所 VSC Extension Development-Create A Code Formatter Extension | szhshp 的第三边境研究所 OneNote Extension-Main API | szhshp 的第三边境研究所 TortoiseGit Win10 Icon not showing correctly | szhshp 的第三边境研究所 Mongoose: aggregate() 方法实现聚合函数 | szhshp 的第三边境研究所 React In Depth - React 源码解析 - render() & Fiber | szhshp 的第三边境研究所 MongoDB x Mongoose: 实现类似 Join 的功能 | szhshp 的第三边境研究所 Disqus 评论框改造工程-实现 Disqus 代理的 Serverless 服务 | szhshp 的第三边境研究所 GUI, CLI, Terminal, Shell, TTY, Console, Bash | szhshp 的第三边境研究所 Jest Async Best Practise: No Nested Async | szhshp 的第三边境研究所
Docker 构建镜像报错: error getting credentials - err: exit status 1, out: `` | szhshp 的第三边境研究所
2025-04-30 · via Java不加糖的Blog

Meta

目录

我就说 GPT 不靠谱吧

执行 docker compose up --build 的时候遇到以下问题:

[+] Building 0.3s (2/3) docker:desktop-linux
[+] Building 2.1s (2/3) docker:desktop-linux
[+] Building 11.1s (3/3) FINISHED docker:desktop-linux
 => [browser-use-webui internal] load build definition from Dockerfile          0.0s
 => => transferring dockerfile: 2.04kB                                          0.0s
 => [browser-use-webui internal] load .dockerignore                             0.0s
 => => transferring context: 48B                                                0.0s
 => ERROR [browser-use-webui internal] load metadata for docker.io/library/python:3.11-slim 11.0s
------
 > [browser-use-webui internal] load metadata for docker.io/library/python:3.11-slim:
------

一开始使用 Wrap 进行排查, 提示我可能是网络问题, 我猜想最近的源可能又崩了, 于是找了个新的源放到 ~/.docker/daemon.json

前一次设置源重启服务后, 通过 docker info 查看了 Registry 地址. 这次 GPT 提示直接用 docker info | grep 'Registry' 来查看当前的 Registry, 我就直接执行了, 但是我发现这个命令并没有输出任何东西.

docker info | grep "Registry Mirrors"

WARNING: daemon is not using the default seccomp profile
 Registry Mirrors:

当然没有输出任何东西啊, Registry Mirrors: 后面带了个冒号, 显然新配置的源在后面几行啊! (AI 就是傻子)

实际上配置成功:

docker info | grep "Registry Mirrors" -A 5

WARNING: daemon is not using the default seccomp profile
 Registry Mirrors:
  https://docker.1ms.run/
  https://docker.xuanyuan.me/
 Live Restore Enabled: false

但是没有用, 因为一开始就被 AI 误导了, 我还在找如何在 Mac 上面进行 systemctl 的方法, 其实单纯是 Auth 的问题, Docker 源运转正常.

手动搜索找到 这一篇:

MacOS - I just had to change the docker config file.
The "credsStore"was "desktop"and changed it to "osxkeychain".
used nano to do it. sudo nano ~/.docker/config.json

修改后直接生效

问题解析

Docker 在访问私有镜像仓库凭据时, 会使用指定的凭据存储程序 (credential helper) , 比如:

  • “desktop”: 指的是 Docker Desktop 的内置凭据管理器;
  • “osxkeychain”: 指的是 macOS 自带的 Keychain 系统;
  • 其他还有比如 “pass”, “secretservice” 等, 视平台而定.

将凭据存储程序改成 “osxkeychain” 后, Docker 会改用 docker-credential-osxkeychain . 这是 Docker 在 macOS 上推荐使用的默认 helper, 通常在安装 Docker Desktop 时就会一并安装. 由于该 helper 能够正确与 macOS 的 Keychain 系统集成, 因此不会再出现相关报错.

osxkeychain vs desktop Credential Helper 对比

对比项docker-credential-osxkeychaindocker-credential-desktop
📦 安装来源随 Docker CLI 一起安装 (或手动安装)随 Docker Desktop GUI 一起安装
🧠 依赖组件macOS Keychain (系统级)Docker Desktop GUI 组件
📍 凭据存储位置macOS 系统钥匙串 (Keychain Access)Docker Desktop 的本地存储 (非系统 Keychain)
🖥️ GUI 依赖❌ 无需 Docker Desktop✅ 依赖 Docker Desktop
🛠️ CLI 兼容性✅ 非图形界面可用, 适用于 SSH, Headless 环境❌ CLI-only 环境常出错
🔒 安全性✅ 高, 原生系统加密保护✅ 也高, 但依赖 Docker Desktop 本身的机制
🔁 可移植性✅ 跨 CLI 和 GUI 通用❌ 只能在 GUI 环境下工作
🧪 稳定性✅ 稳定, 官方推荐❌ 较多报错, 尤其在 CLI-only 场景
🛠️ 手动配置方便性✅ 支持 CLI 轻松查看和更改 Keychain❌ 几乎无文档, Debug 不便

推荐使用场景

  • 使用 osxkeychain:
  • 你主要用 Terminal;
  • 或远程连接 (如 SSH) ;
  • 或不依赖 Docker Desktop 图形界面;
  • 想使用系统 Keychain 管理凭据.
  • 使用 desktop:
  • 你完全通过 Docker Desktop 管理镜像和登录;
  • 不介意它依赖图形界面和 GUI 的凭据系统.

如果你希望 Docker 在任何终端环境下都稳定工作, 建议优先使用 osxkeychain

总结

我就说 GPT 不靠谱吧, 浪费我俩小时