create

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunCommand = false
)

Variables

View Source
var (
	StarlightFlags = []cli.Flag{
		&cli.BoolFlag{
			Name:     "optimize",
			Usage:    "collect workload information to optimize deployment speed for other peers",
			Value:    false,
			Required: false,
		},
		&cli.StringFlag{
			Name:        "optimize-group",
			Aliases:     []string{"app", "workload"},
			Usage:       "assign a label to this workload",
			Value:       "default",
			DefaultText: "default",
			Required:    false,
		},
	}

	// ContainerFlags are cli flags specifying container options
	ContainerFlags = []cli.Flag{
		&cli.StringFlag{
			Name:  "cwd",
			Usage: "specify the working directory of the process",
		},
		&cli.StringSliceFlag{
			Name:  "env",
			Usage: "specify additional container environment variables (i.e. FOO=bar)",
		},
		&cli.StringFlag{
			Name:  "env-file",
			Usage: "specify additional container environment variables in a file(i.e. FOO=bar, one per line)",
		},
		&cli.StringSliceFlag{
			Name:  "label",
			Usage: "specify additional labels (i.e. foo=bar)",
		},
		&cli.StringSliceFlag{
			Name:  "mount",
			Usage: "specify additional container mount (ex: type=bind,src=/tmp,dst=/host,options=rbind:ro)",
		},
		&cli.BoolFlag{
			Name:  "net-host",
			Usage: "enable host networking for the container",
		},
		&cli.BoolFlag{
			Name:  "privileged",
			Usage: "run privileged container",
		},
		&cli.BoolFlag{
			Name:  "tty,t",
			Usage: "allocate a TTY for the container",
		},
		&cli.StringSliceFlag{
			Name:  "with-ns",
			Usage: "specify existing Linux namespaces to join at container runtime (format '<nstype>:<path>')",
		},
		&cli.IntFlag{
			Name:  "gpus",
			Usage: "add gpus to the container",
		},
		&cli.Uint64Flag{
			Name:  "memory-limit",
			Usage: "memory limit (in bytes) for the container",
		},
		&cli.StringSliceFlag{
			Name:  "device",
			Usage: "add a device to a container",
		},
		&cli.BoolFlag{
			Name:  "local-time",
			Usage: "synchronize host local time",
		},
		&cli.StringFlag{
			Name:  "host-name",
			Usage: "host name for this container worker",
		},
	}
)

Functions

func Action

func Action(c *cli.Context) error

func Command

func Command() *cli.Command

func WithImageConfig

func WithImageConfig(cfg []byte) oci.SpecOpts

Copy from spec_opts

func WithImageStopSignal

func WithImageStopSignal() containerd.NewContainerOpts

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL