cache: fix setting root labels on commit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>docker-18.09
parent
b7664f71b9
commit
013f95eaf7
|
@ -223,7 +223,10 @@ func (cr *cacheRecord) finalize(ctx context.Context) error {
|
|||
if mutable == nil {
|
||||
return nil
|
||||
}
|
||||
err := cr.cm.Snapshotter.Commit(ctx, cr.ID(), mutable.ID())
|
||||
labels := map[string]string{
|
||||
"containerd.io/gc.root": time.Now().UTC().Format(time.RFC3339Nano),
|
||||
}
|
||||
err := cr.cm.Snapshotter.Commit(ctx, cr.ID(), mutable.ID(), cdsnapshot.WithLabels(labels))
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to commit %s", mutable.ID())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue