build: Fix iidfile for containerd-backed Docker driver
Images loaded into Docker's containerd image store are identified by their manifest or index digest, while the legacy graphdriver store uses the config digest. buildx prefers containerimage.config.digest when the Moby exporter returns both digests. Some exporter responses still produce a usable iidfile, but affected builds, such as those with attestations disabled, write a config digest that Docker image commands cannot resolve. Expose the Docker driver's image-store mode as a feature and set prefer-image-digest for containerd-backed Moby exports. Signed-off-by: Paweł Gronowski <git@grono.dev>
This commit is contained in:
@@ -92,12 +92,13 @@ func (d *Driver) Features(ctx context.Context) map[driver.Feature]bool {
|
||||
c.Close()
|
||||
}
|
||||
d.features.list = map[driver.Feature]bool{
|
||||
driver.OCIExporter: useContainerdSnapshotter,
|
||||
driver.DockerExporter: useContainerdSnapshotter,
|
||||
driver.CacheExport: useContainerdSnapshotter,
|
||||
driver.MultiPlatform: useContainerdSnapshotter,
|
||||
driver.DirectPush: useContainerdSnapshotter,
|
||||
driver.DefaultLoad: true,
|
||||
driver.OCIExporter: useContainerdSnapshotter,
|
||||
driver.DockerExporter: useContainerdSnapshotter,
|
||||
driver.CacheExport: useContainerdSnapshotter,
|
||||
driver.MultiPlatform: useContainerdSnapshotter,
|
||||
driver.DirectPush: useContainerdSnapshotter,
|
||||
driver.PreferImageDigest: useContainerdSnapshotter,
|
||||
driver.DefaultLoad: true,
|
||||
}
|
||||
})
|
||||
return d.features.list
|
||||
|
||||
@@ -8,5 +8,6 @@ const DockerExporter Feature = "Docker exporter"
|
||||
const CacheExport Feature = "Cache export"
|
||||
const MultiPlatform Feature = "Multi-platform build"
|
||||
const DirectPush Feature = "Direct push"
|
||||
const PreferImageDigest Feature = "Prefer image digest"
|
||||
|
||||
const DefaultLoad Feature = "Automatically load images to the Docker Engine image store"
|
||||
|
||||
Reference in New Issue
Block a user