From 5cde04bc7cf48bbadd792177197908ef89352c38 Mon Sep 17 00:00:00 2001 From: Justin Terry Date: Tue, 21 Jun 2022 07:54:23 -0700 Subject: [PATCH] Forward ctr snapshotter flags on Windows Signed-off-by: Justin Terry --- cmd/ctr/commands/run/run_windows.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/ctr/commands/run/run_windows.go b/cmd/ctr/commands/run/run_windows.go index 52af73a0f..f0ae22b96 100644 --- a/cmd/ctr/commands/run/run_windows.go +++ b/cmd/ctr/commands/run/run_windows.go @@ -27,6 +27,7 @@ import ( "github.com/containerd/containerd/cmd/ctr/commands" "github.com/containerd/containerd/oci" "github.com/containerd/containerd/pkg/netns" + "github.com/containerd/containerd/snapshots" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" "github.com/urfave/cli" @@ -100,7 +101,10 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli containerd.WithImage(image), containerd.WithImageConfigLabels(image), containerd.WithSnapshotter(snapshotter), - containerd.WithNewSnapshot(id, image), + containerd.WithNewSnapshot( + id, + image, + snapshots.WithLabels(commands.LabelArgs(context.StringSlice("snapshotter-label")))), containerd.WithAdditionalContainerLabels(labels)) if len(args) > 0 {