Просмотр исходного кода

builder: fix incorrect cache match for inline cache with empty layers

See https://github.com/moby/buildkit/pull/1993

Signed-off-by: Tibor Vass <tibor@docker.com>
Tibor Vass 4 лет назад
Родитель
Сommit
9bf93e90fa
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      builder/builder-next/adapters/localinlinecache/inlinecache.go

+ 5 - 0
builder/builder-next/adapters/localinlinecache/inlinecache.go

@@ -22,6 +22,11 @@ import (
 	"github.com/pkg/errors"
 )
 
+func init() {
+	// See https://github.com/moby/buildkit/pull/1993.
+	v1.EmptyLayerRemovalSupported = false
+}
+
 // ResolveCacheImporterFunc returns a resolver function for local inline cache
 func ResolveCacheImporterFunc(sm *session.Manager, resolverFunc docker.RegistryHosts, cs content.Store, rs reference.Store, is imagestore.Store) remotecache.ResolveCacheImporterFunc {