Merge pull request #7086 from jterry75/main

Forward ctr snapshotter flags on Windows
This commit is contained in:
Kevin Parsons 2022-06-21 12:21:44 -07:00 committed by GitHub
commit 0fac756b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {