luet/vendor/github.com/moby/buildkit/util/winlayers/context.go
Ettore Di Giacinto 92e18d5782 Support priv/unpriv image extraction
Optionally add back privileged extraction which can be enabled with
LUET_PRIVILEGED_EXTRACT=true

Signed-off-by: Ettore Di Giacinto <mudler@sabayon.org>
2021-06-16 23:30:28 +02:00

20 lines
362 B
Go

package winlayers
import "context"
type contextKeyT string
var contextKey = contextKeyT("buildkit/winlayers-on")
func UseWindowsLayerMode(ctx context.Context) context.Context {
return context.WithValue(ctx, contextKey, true)
}
func hasWindowsLayerMode(ctx context.Context) bool {
v := ctx.Value(contextKey)
if v == nil {
return false
}
return true
}