Reputation: 1
I am experiencing an issue with Docker Desktop on MacOS (Sonoma 14.7) where the Digest and Image ID of pulled images are identical. This behavior is causing problems when importing images into a k3d cluster. I reached out to Docker Support, and while they acknowledged the issue and filed a bug report, they have not provided a resolution or timeline.
Problem Description
I recently (about one month ago) installed Docker Desktop from scratch on my MacBook Air (13-inch, M3, 2024, MacOS Sonoma 14.7). When trying to import an image into a local k3d cluster (k3d version v5.7.4, k3s version v1.30.4-k3s1 (default)), I encountered errors for both AMD64 and ARM64 platforms.
I get an error when importing for ARM64 platform, as shown in the figure:
$ 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
The error:
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
I get a similar error when importing for AMD64 platform, as shown in the figure:
$ k3d image import quay.io/minio/minio: RELEASE.2024-08-17T01-24-54Z -c local
The error:
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
After some debugging, I noticed a strange behavior in Docker: all images in my local registry have their Digest and Image ID set to the same hash as the correspondent OCI Image Index, as visible in figure, but the output is something like this:
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
This behavior does not seem correct. Based on my understanding, the Digest should represent the hash of the OCI Image Index, while the Image ID should correspond to the hash of a manifest for a specific platform. To work around this, I decided to pull the image directly by its hash for the AMD64 platform, and it worked. This workaround demonstrates that Docker is currently unable to pull images correctly by tag. I had to explicitly pull the image by hash to get it working, visible in figure. However, even after pulling by hash, the Digest and Image ID remain equal.
I have already tried purging and reinstalling Docker Desktop, but the issue persists. A colleague who had Docker Desktop working for over a year also encountered the same issue after purging Docker. I found another two coworker, both we MacBook M2, experiencing the same problem (image equal to digest). I strongly believe this is an issue with the latest version of Docker Desktop for MacOS.
While I have found a workaround, this behavior is clearly incorrect, and I would like to find a permanent fix.
Reproduction Steps:
Response from Docker Support
I have contacted Docker Support, and they have acknowledged the issue and confirmed it is reproducible on their end. However, they stated that it is outside the scope of their support since k3d is not part of Docker Desktop. A bug report has been filed, but there is no timeline for a resolution.
Thank you for your time and assistance.
Upvotes: 0
Views: 98