sbt-docker icon indicating copy to clipboard operation
sbt-docker copied to clipboard

Parse Image Correctly When Using Containerd Image Store

Open h0ngcha0 opened this issue 1 year ago • 3 comments

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!

h0ngcha0 avatar Mar 23 '24 10:03 h0ngcha0

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!

xkrt avatar Apr 08 '24 12:04 xkrt

Nice PR, solved my issue!

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

aednichols avatar Apr 30 '24 04:04 aednichols

This is awesome! Thanks for figuring this out.

THWiseman avatar May 01 '24 14:05 THWiseman