Forward ctr snapshotter flags on Windows

Signed-off-by: Justin Terry <jlterry@amazon.com>
This commit is contained in:
Justin Terry 2022-06-21 07:54:23 -07:00
parent 16992a4a2e
commit 5cde04bc7c

View File

@ -27,6 +27,7 @@ import (
"github.com/containerd/containerd/cmd/ctr/commands" "github.com/containerd/containerd/cmd/ctr/commands"
"github.com/containerd/containerd/oci" "github.com/containerd/containerd/oci"
"github.com/containerd/containerd/pkg/netns" "github.com/containerd/containerd/pkg/netns"
"github.com/containerd/containerd/snapshots"
specs "github.com/opencontainers/runtime-spec/specs-go" specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/urfave/cli" "github.com/urfave/cli"
@ -100,7 +101,10 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
containerd.WithImage(image), containerd.WithImage(image),
containerd.WithImageConfigLabels(image), containerd.WithImageConfigLabels(image),
containerd.WithSnapshotter(snapshotter), containerd.WithSnapshotter(snapshotter),
containerd.WithNewSnapshot(id, image), containerd.WithNewSnapshot(
id,
image,
snapshots.WithLabels(commands.LabelArgs(context.StringSlice("snapshotter-label")))),
containerd.WithAdditionalContainerLabels(labels)) containerd.WithAdditionalContainerLabels(labels))
if len(args) > 0 { if len(args) > 0 {