From 0ac3bf837b9c078c7d6a965f3c5328fafad64f83 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 6 Mar 2023 22:27:51 +0000 Subject: [PATCH] builder-next: disable mergeop and diffop Signed-off-by: Tonis Tiigi Signed-off-by: Bjorn Neergaard --- builder/builder-next/controller.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/builder/builder-next/controller.go b/builder/builder-next/controller.go index 915ff758b7..5bf69b1d84 100644 --- a/builder/builder-next/controller.go +++ b/builder/builder-next/controller.go @@ -49,6 +49,9 @@ import ( "github.com/pkg/errors" "go.etcd.io/bbolt" bolt "go.etcd.io/bbolt" + + "github.com/moby/buildkit/solver/pb" + "github.com/moby/buildkit/util/apicaps" ) func newController(ctx context.Context, rt http.RoundTripper, opt Opt) (*control.Controller, error) { @@ -165,6 +168,18 @@ func newGraphDriverController(ctx context.Context, rt http.RoundTripper, opt Opt dist := opt.Dist root := opt.Root + pb.Caps.Init(apicaps.Cap{ + ID: pb.CapMergeOp, + Enabled: false, + DisabledReasonMsg: "only enabled with containerd image store backend", + }) + + pb.Caps.Init(apicaps.Cap{ + ID: pb.CapDiffOp, + Enabled: false, + DisabledReasonMsg: "only enabled with containerd image store backend", + }) + var driver graphdriver.Driver if ls, ok := dist.LayerStore.(interface { Driver() graphdriver.Driver