fix unable to checkpoint the container more than once

Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
This commit is contained in:
Iceber Gu 2023-04-17 14:02:18 +08:00
parent c5a43b0007
commit 8ba285f6b2

View File

@ -664,7 +664,7 @@ func (l *local) writeContent(ctx context.Context, mediaType, ref string, r io.Re
if err != nil {
return nil, err
}
if err := writer.Commit(ctx, 0, ""); err != nil {
if err := writer.Commit(ctx, 0, ""); err != nil && !errdefs.IsAlreadyExists(err) {
return nil, err
}
return &types.Descriptor{