Move ctr run --isolation to Windows only
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
parent
75c490c5c4
commit
f90e5d564a
@ -106,15 +106,11 @@ var Command = cli.Command{
|
|||||||
Name: "fifo-dir",
|
Name: "fifo-dir",
|
||||||
Usage: "directory used for storing IO FIFOs",
|
Usage: "directory used for storing IO FIFOs",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "isolated",
|
|
||||||
Usage: "run the container with vm isolation",
|
|
||||||
},
|
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "cgroup",
|
Name: "cgroup",
|
||||||
Usage: "cgroup path (To disable use of cgroup, set to \"\" explicitly)",
|
Usage: "cgroup path (To disable use of cgroup, set to \"\" explicitly)",
|
||||||
},
|
},
|
||||||
}, append(commands.SnapshotterFlags, commands.ContainerFlags...)...),
|
}, append(platformRunFlags, append(commands.SnapshotterFlags, commands.ContainerFlags...)...)...),
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
|
@ -32,6 +32,8 @@ import (
|
|||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var platformRunFlags []cli.Flag
|
||||||
|
|
||||||
// NewContainer creates a new container
|
// NewContainer creates a new container
|
||||||
func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli.Context) (containerd.Container, error) {
|
func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli.Context) (containerd.Container, error) {
|
||||||
var (
|
var (
|
||||||
|
@ -29,6 +29,13 @@ import (
|
|||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var platformRunFlags = []cli.Flag{
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "isolated",
|
||||||
|
Usage: "run the container with vm isolation",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
// NewContainer creates a new container
|
// NewContainer creates a new container
|
||||||
func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli.Context) (containerd.Container, error) {
|
func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli.Context) (containerd.Container, error) {
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user