Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Image Correctly When Using Containerd Image Store #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

h0ngcha0
Copy link

Hey Marcus, how are you?

I found an issue about building image when containerd is enabled for image store (needed for building multi-platform images). Seems that images needs to be parsed slightly differently in this case.

The way to reproduce it on my linux machine is to

  1. Enable containerd image store (Following https://docs.docker.com/storage/containerd/)
  2. Build a random image (with or without specifying multiple platforms)

It should report something like

[info] Tagging image 9f7f478055830d4b6f0981b76dcb33be52c1ef1496c71b2dbbecf7336ede58a2 with name: test-name
[info] Error response from daemon: No such image: sha256:9f7f478055830d4b6f0981b76dcb33be52c1ef1496c71b2dbbecf7336ede58a2

The follow commit should fix it, please see tests for the output from docker deamon. Thanks!

@xkrt
Copy link

xkrt commented Apr 8, 2024

Hi @marcuslonnberg!

I've hit the same issue. My setup:

  • macOS
  • Docker Desktop v4.28.0
  • Turned on Use containerd for pulling and storing images for multi-platform building as stated in the documentation

I confirm that this patch will fix the issue.

Please merge & publish new release.

Thanks!

@aednichols
Copy link

Nice PR, solved my issue!

I cloned @h0ngcha0's fork, did an sbt publishLocal, and set my build to use 1.11.1-SNAPSHOT.

@THWiseman
Copy link

This is awesome! Thanks for figuring this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants