Check remote snapshot availability only for stargz

Signed-off-by: ktock <ktokunaga.mail@gmail.com>
v0.8
ktock 2020-11-21 15:05:12 +09:00
parent 0caddb1c72
commit 0bd43aa1dc
1 changed files with 4 additions and 2 deletions

6
cache/refs.go vendored
View File

@ -399,8 +399,10 @@ func (sr *immutableRef) Extract(ctx context.Context, s session.Group) (rerr erro
ctx = winlayers.UseWindowsLayerMode(ctx)
}
if _, err := sr.prepareRemoteSnapshots(ctx, sr.descHandlers); err != nil {
return err
if sr.cm.Snapshotter.Name() == "stargz" {
if _, err := sr.prepareRemoteSnapshots(ctx, sr.descHandlers); err != nil {
return err
}
}
return sr.extract(ctx, sr.descHandlers, s)