libcontainerd: change the digest used when restoring

For current implementation of Checkpoint Restore (C/R) in docker, it
will write the checkpoint to content store. However, when restoring
libcontainerd uses .Digest().Encoded(), which will remove the info
of alg, leading to error.

Signed-off-by: huang-jl <1046678590@qq.com>
This commit is contained in:
huang-jl 2024-02-27 20:17:31 +08:00
parent 8cdb5a9070
commit da643c0b8a

View file

@ -723,7 +723,7 @@ func (c *client) writeContent(ctx context.Context, mediaType, ref string, r io.R
}
return &types.Descriptor{
MediaType: mediaType,
Digest: writer.Digest().Encoded(),
Digest: writer.Digest().String(),
Size: size,
}, nil
}