MacOS Sonoma(M3/M2)Docker Desktop镜像Digest与ID一致致k3d导入失败
Docker Desktop在M2/M3芯片Sonoma系统Mac上Digest与Image ID一致导致k3d镜像导入失败的永久解决办法
环境信息
- MacBook Air(13英寸,M3,2024款)
- macOS Sonoma 14.7
- Docker Desktop(最新版本)
- k3d v5.7.4,k3s v1.30.4-k3s1
问题现象
拉取的镜像其Digest与Image ID完全一致,导致向本地k3d集群导入镜像失败,AMD64和ARM64平台均受影响。
ARM64镜像导入失败场景
执行命令:
$ docker pull quay.io/minio/minio:RELEASE.2024-08-1701-24-54Z --platform=linux/arm64 $ k3d image import quay.io/minio/minio:RELEASE.2024-08-17T01-24-54Z -c local
报错信息:
ERRO[0002] failed to import images in node 'k3d-local-server-0': Exec process in node "k3d-local-server-0" failed with exit code "1': Logs from failed access process: tr: content digest sha256:496654144ff7326f5626c6a279442513a168f911c08b8dda3ffc1e66d5f4: not found
AMD64镜像导入失败场景
执行命令:
$ k3d image import quay.io/minio/minio:RELEASE.2024-08-17T01-24-54Z -c local
报错信息:
ERRO [0001] Failed to import image(s) into cluster 'local': failed to save image(s) in tools container for cluster 'local': Exec process in node 'k3d-local-tools' failed with exit code '1': Logs from failed access process: FATA[0000] ERROR: couldn't save images [quay.io/minio/minio:RELEASE.2024-08-17T01-24-54Z] rror response from daemon: unable to create manifests file: NotFound: content digest sha256:58a7be593df84c96789a1cccf17f6c45cbd815ce628fa9ff88adb55bc783838e: not
异常细节
本地镜像仓库中所有镜像的Digest和Image ID均与对应OCI Image Index的哈希值一致,示例输出:
REPOSITORY TAG DIGEST IMAGE ID quay.io/minio/minio RELEASE.2024-08-17T01-24-54Z sha256:2cd2db64933fa35374af663c6e7c1cfbe979f7af4d845a64a6c462f10de50dc7 2cd2db64933f quay.io/keycloak/keycloak 25.0.2 sha256:c45eea6160f5bd59fb22b9b3fb10ca2b2effabc5ab3022f206fb5513814dc5c3 c45eea6160f5
正常逻辑下,Digest应代表OCI Image Index的哈希,Image ID对应特定平台镜像清单的哈希,当前行为明显异常。
已尝试的操作与临时方案
- 彻底卸载并重装Docker Desktop,问题依旧;
- 多位M2/M3芯片MacBook用户均遇到相同问题,确认是最新版macOS Docker Desktop的Bug;
- 联系Docker Support,对方确认可复现并归档Bug,但因k3d不属于Docker Desktop范畴,未提供修复方案及时间线;
- 临时解决办法:直接按哈希拉取AMD64平台镜像,但即使如此,Digest与Image ID仍保持一致。
问题复现步骤
- 使用搭载M3/M2芯片、macOS Sonoma系统的MacBook;
- 彻底卸载Docker Desktop后安装最新版本,拉取任意镜像;
- 观察到Digest与Image ID一致,且向k3d导入镜像失败。
寻求永久解决办法
内容的提问来源于stack exchange,提问作者Cláudio Correia
相关产品推荐
相关产品推荐

