Skip to content

fix: image digest for docker-container builds

I found that !81 (closed) is still not merged, so I created this MR based on it and my suggestions.

We have 3 possible situations related to image pinning:

  1. for image created with docker build or docker buildx build using docker driver the digest can be extracted from docker image inspect
  2. for singlearch image created with docker buildx build using docker-container driver the digest can be computed or extracted from docker buildx imagetools inspect (I haven't seen a manifests list containing a single manifest but it is theoretically possible)
  3. for multiarch image the digest can't be added because each platform specific image has its own digest

I also added tests for all these situations.

Thank you and sorry for not creating this MR earlier)

Merge request reports