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:
+1
-1
@@ -463,7 +463,7 @@ func runBuild(ctx context.Context, dockerCli command.Cli, debugOpts debuggerOpti
|
||||
return nil
|
||||
}
|
||||
|
||||
// getImageID returns the image ID - the digest of the image config
|
||||
// getImageID returns the image identifier selected for the export destination.
|
||||
func getImageID(resp map[string]string) string {
|
||||
dgst := resp[exptypes.ExporterImageDigestKey]
|
||||
if v, ok := resp[exptypes.ExporterImageConfigDigestKey]; ok {
|
||||
|
||||
Reference in New Issue
Block a user