Merge pull request #7976 from yulng/lowercase
keep the uppercase letter for flag info
This commit is contained in:
commit
97480afdac
@ -39,11 +39,11 @@ import (
|
|||||||
|
|
||||||
var densityCommand = cli.Command{
|
var densityCommand = cli.Command{
|
||||||
Name: "density",
|
Name: "density",
|
||||||
Usage: "stress tests density of containers running on a system",
|
Usage: "Stress tests density of containers running on a system",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "count",
|
Name: "count",
|
||||||
Usage: "number of containers to run",
|
Usage: "Number of containers to run",
|
||||||
Value: 10,
|
Value: 10,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -126,52 +126,52 @@ func main() {
|
|||||||
app.Flags = []cli.Flag{
|
app.Flags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
Usage: "set debug output in the logs",
|
Usage: "Set debug output in the logs",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "address,a",
|
Name: "address,a",
|
||||||
Value: "/run/containerd/containerd.sock",
|
Value: "/run/containerd/containerd.sock",
|
||||||
Usage: "path to the containerd socket",
|
Usage: "Path to the containerd socket",
|
||||||
},
|
},
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "concurrent,c",
|
Name: "concurrent,c",
|
||||||
Value: 1,
|
Value: 1,
|
||||||
Usage: "set the concurrency of the stress test",
|
Usage: "Set the concurrency of the stress test",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "cri",
|
Name: "cri",
|
||||||
Usage: "utilize CRI to create pods for the stress test. This requires a runtime that matches CRI runtime handler. Example: --runtime runc",
|
Usage: "Utilize CRI to create pods for the stress test. This requires a runtime that matches CRI runtime handler. Example: --runtime runc",
|
||||||
},
|
},
|
||||||
cli.DurationFlag{
|
cli.DurationFlag{
|
||||||
Name: "duration,d",
|
Name: "duration,d",
|
||||||
Value: 1 * time.Minute,
|
Value: 1 * time.Minute,
|
||||||
Usage: "set the duration of the stress test",
|
Usage: "Set the duration of the stress test",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "exec",
|
Name: "exec",
|
||||||
Usage: "add execs to the stress tests (non-CRI only)",
|
Usage: "Add execs to the stress tests (non-CRI only)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "image,i",
|
Name: "image,i",
|
||||||
Value: "docker.io/library/alpine:latest",
|
Value: "docker.io/library/alpine:latest",
|
||||||
Usage: "image to be utilized for testing",
|
Usage: "Image to be utilized for testing",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "json,j",
|
Name: "json,j",
|
||||||
Usage: "output results in json format",
|
Usage: "Output results in json format",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "metrics,m",
|
Name: "metrics,m",
|
||||||
Usage: "address to serve the metrics API",
|
Usage: "Address to serve the metrics API",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "runtime",
|
Name: "runtime",
|
||||||
Usage: "set the runtime to stress test",
|
Usage: "Set the runtime to stress test",
|
||||||
Value: plugin.RuntimeRuncV2,
|
Value: plugin.RuntimeRuncV2,
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "snapshotter",
|
Name: "snapshotter",
|
||||||
Usage: "set the snapshotter to use",
|
Usage: "Set the snapshotter to use",
|
||||||
Value: "overlayfs",
|
Value: "overlayfs",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -98,18 +98,18 @@ func defaultConfig() *srvconfig.Config {
|
|||||||
|
|
||||||
var configCommand = cli.Command{
|
var configCommand = cli.Command{
|
||||||
Name: "config",
|
Name: "config",
|
||||||
Usage: "information on the containerd config",
|
Usage: "Information on the containerd config",
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "default",
|
Name: "default",
|
||||||
Usage: "see the output of the default config",
|
Usage: "See the output of the default config",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
return outputConfig(defaultConfig())
|
return outputConfig(defaultConfig())
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "dump",
|
Name: "dump",
|
||||||
Usage: "see the output of the final main config with imported in subconfig files",
|
Usage: "See the output of the final main config with imported in subconfig files",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
config := defaultConfig()
|
config := defaultConfig()
|
||||||
if err := srvconfig.LoadConfig(context.GlobalString("config"), config); err != nil && !os.IsNotExist(err) {
|
if err := srvconfig.LoadConfig(context.GlobalString("config"), config); err != nil && !os.IsNotExist(err) {
|
||||||
|
@ -80,16 +80,16 @@ can be used and modified as necessary as a custom configuration.`
|
|||||||
app.Flags = []cli.Flag{
|
app.Flags = []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "config,c",
|
Name: "config,c",
|
||||||
Usage: "path to the configuration file",
|
Usage: "Path to the configuration file",
|
||||||
Value: filepath.Join(defaults.DefaultConfigDir, "config.toml"),
|
Value: filepath.Join(defaults.DefaultConfigDir, "config.toml"),
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "log-level,l",
|
Name: "log-level,l",
|
||||||
Usage: "set the logging level [trace, debug, info, warn, error, fatal, panic]",
|
Usage: "Set the logging level [trace, debug, info, warn, error, fatal, panic]",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "address,a",
|
Name: "address,a",
|
||||||
Usage: "address for containerd's GRPC server",
|
Usage: "Address for containerd's GRPC server",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "root",
|
Name: "root",
|
||||||
|
@ -31,7 +31,7 @@ import (
|
|||||||
|
|
||||||
var ociHook = cli.Command{
|
var ociHook = cli.Command{
|
||||||
Name: "oci-hook",
|
Name: "oci-hook",
|
||||||
Usage: "provides a base for OCI runtime hooks to allow arguments to be injected.",
|
Usage: "Provides a base for OCI runtime hooks to allow arguments to be injected.",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
state, err := loadHookState(os.Stdin)
|
state, err := loadHookState(os.Stdin)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -38,15 +38,15 @@ import (
|
|||||||
|
|
||||||
var publishCommand = cli.Command{
|
var publishCommand = cli.Command{
|
||||||
Name: "publish",
|
Name: "publish",
|
||||||
Usage: "binary to publish events to containerd",
|
Usage: "Binary to publish events to containerd",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "namespace",
|
Name: "namespace",
|
||||||
Usage: "namespace to publish to",
|
Usage: "Namespace to publish to",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "topic",
|
Name: "topic",
|
||||||
Usage: "topic of the event",
|
Usage: "Topic of the event",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -78,7 +78,7 @@ containerd CLI
|
|||||||
app.Flags = []cli.Flag{
|
app.Flags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
Usage: "enable debug output in logs",
|
Usage: "Enable debug output in logs",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "address, a",
|
Name: "address, a",
|
||||||
@ -88,11 +88,11 @@ containerd CLI
|
|||||||
},
|
},
|
||||||
cli.DurationFlag{
|
cli.DurationFlag{
|
||||||
Name: "timeout",
|
Name: "timeout",
|
||||||
Usage: "total timeout for ctr commands",
|
Usage: "Total timeout for ctr commands",
|
||||||
},
|
},
|
||||||
cli.DurationFlag{
|
cli.DurationFlag{
|
||||||
Name: "connect-timeout",
|
Name: "connect-timeout",
|
||||||
Usage: "timeout for connecting to containerd",
|
Usage: "Timeout for connecting to containerd",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "namespace, n",
|
Name: "namespace, n",
|
||||||
|
@ -40,57 +40,57 @@ var (
|
|||||||
// SnapshotterLabels are cli flags specifying labels which will be added to the new snapshot for container.
|
// SnapshotterLabels are cli flags specifying labels which will be added to the new snapshot for container.
|
||||||
SnapshotterLabels = cli.StringSliceFlag{
|
SnapshotterLabels = cli.StringSliceFlag{
|
||||||
Name: "snapshotter-label",
|
Name: "snapshotter-label",
|
||||||
Usage: "labels added to the new snapshot for this container.",
|
Usage: "Labels added to the new snapshot for this container.",
|
||||||
}
|
}
|
||||||
|
|
||||||
// LabelFlag is a cli flag specifying labels
|
// LabelFlag is a cli flag specifying labels
|
||||||
LabelFlag = cli.StringSliceFlag{
|
LabelFlag = cli.StringSliceFlag{
|
||||||
Name: "label",
|
Name: "label",
|
||||||
Usage: "labels to attach to the image",
|
Usage: "Labels to attach to the image",
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegistryFlags are cli flags specifying registry options
|
// RegistryFlags are cli flags specifying registry options
|
||||||
RegistryFlags = []cli.Flag{
|
RegistryFlags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "skip-verify,k",
|
Name: "skip-verify,k",
|
||||||
Usage: "skip SSL certificate validation",
|
Usage: "Skip SSL certificate validation",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "plain-http",
|
Name: "plain-http",
|
||||||
Usage: "allow connections using plain HTTP",
|
Usage: "Allow connections using plain HTTP",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "user,u",
|
Name: "user,u",
|
||||||
Usage: "user[:password] Registry user and password",
|
Usage: "User[:password] Registry user and password",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "refresh",
|
Name: "refresh",
|
||||||
Usage: "refresh token for authorization server",
|
Usage: "Refresh token for authorization server",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "hosts-dir",
|
Name: "hosts-dir",
|
||||||
// compatible with "/etc/docker/certs.d"
|
// compatible with "/etc/docker/certs.d"
|
||||||
Usage: "custom hosts configuration directory",
|
Usage: "Custom hosts configuration directory",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tlscacert",
|
Name: "tlscacert",
|
||||||
Usage: "path to TLS root CA",
|
Usage: "Path to TLS root CA",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tlscert",
|
Name: "tlscert",
|
||||||
Usage: "path to TLS client certificate",
|
Usage: "Path to TLS client certificate",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tlskey",
|
Name: "tlskey",
|
||||||
Usage: "path to TLS client key",
|
Usage: "Path to TLS client key",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "http-dump",
|
Name: "http-dump",
|
||||||
Usage: "dump all HTTP request/responses when interacting with container registry",
|
Usage: "Dump all HTTP request/responses when interacting with container registry",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "http-trace",
|
Name: "http-trace",
|
||||||
Usage: "enable HTTP tracing for registry interactions",
|
Usage: "Enable HTTP tracing for registry interactions",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,120 +98,120 @@ var (
|
|||||||
ContainerFlags = []cli.Flag{
|
ContainerFlags = []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "config,c",
|
Name: "config,c",
|
||||||
Usage: "path to the runtime-specific spec config file",
|
Usage: "Path to the runtime-specific spec config file",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "cwd",
|
Name: "cwd",
|
||||||
Usage: "specify the working directory of the process",
|
Usage: "Specify the working directory of the process",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "env",
|
Name: "env",
|
||||||
Usage: "specify additional container environment variables (e.g. FOO=bar)",
|
Usage: "Specify additional container environment variables (e.g. FOO=bar)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "env-file",
|
Name: "env-file",
|
||||||
Usage: "specify additional container environment variables in a file(e.g. FOO=bar, one per line)",
|
Usage: "Specify additional container environment variables in a file(e.g. FOO=bar, one per line)",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "label",
|
Name: "label",
|
||||||
Usage: "specify additional labels (e.g. foo=bar)",
|
Usage: "Specify additional labels (e.g. foo=bar)",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "annotation",
|
Name: "annotation",
|
||||||
Usage: "specify additional OCI annotations (e.g. foo=bar)",
|
Usage: "Specify additional OCI annotations (e.g. foo=bar)",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "mount",
|
Name: "mount",
|
||||||
Usage: "specify additional container mount (e.g. type=bind,src=/tmp,dst=/host,options=rbind:ro)",
|
Usage: "Specify additional container mount (e.g. type=bind,src=/tmp,dst=/host,options=rbind:ro)",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "net-host",
|
Name: "net-host",
|
||||||
Usage: "enable host networking for the container",
|
Usage: "Enable host networking for the container",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "privileged",
|
Name: "privileged",
|
||||||
Usage: "run privileged container",
|
Usage: "Run privileged container",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "read-only",
|
Name: "read-only",
|
||||||
Usage: "set the containers filesystem as readonly",
|
Usage: "Set the containers filesystem as readonly",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "runtime",
|
Name: "runtime",
|
||||||
Usage: "runtime name or absolute path to runtime binary",
|
Usage: "Runtime name or absolute path to runtime binary",
|
||||||
Value: defaults.DefaultRuntime,
|
Value: defaults.DefaultRuntime,
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "runtime-config-path",
|
Name: "runtime-config-path",
|
||||||
Usage: "optional runtime config path",
|
Usage: "Optional runtime config path",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "tty,t",
|
Name: "tty,t",
|
||||||
Usage: "allocate a TTY for the container",
|
Usage: "Allocate a TTY for the container",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "with-ns",
|
Name: "with-ns",
|
||||||
Usage: "specify existing Linux namespaces to join at container runtime (format '<nstype>:<path>')",
|
Usage: "Specify existing Linux namespaces to join at container runtime (format '<nstype>:<path>')",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "pid-file",
|
Name: "pid-file",
|
||||||
Usage: "file path to write the task's pid",
|
Usage: "File path to write the task's pid",
|
||||||
},
|
},
|
||||||
cli.IntSliceFlag{
|
cli.IntSliceFlag{
|
||||||
Name: "gpus",
|
Name: "gpus",
|
||||||
Usage: "add gpus to the container",
|
Usage: "Add gpus to the container",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "allow-new-privs",
|
Name: "allow-new-privs",
|
||||||
Usage: "turn off OCI spec's NoNewPrivileges feature flag",
|
Usage: "Turn off OCI spec's NoNewPrivileges feature flag",
|
||||||
},
|
},
|
||||||
cli.Uint64Flag{
|
cli.Uint64Flag{
|
||||||
Name: "memory-limit",
|
Name: "memory-limit",
|
||||||
Usage: "memory limit (in bytes) for the container",
|
Usage: "Memory limit (in bytes) for the container",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "cap-add",
|
Name: "cap-add",
|
||||||
Usage: "add Linux capabilities (Set capabilities with 'CAP_' prefix)",
|
Usage: "Add Linux capabilities (Set capabilities with 'CAP_' prefix)",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "cap-drop",
|
Name: "cap-drop",
|
||||||
Usage: "drop Linux capabilities (Set capabilities with 'CAP_' prefix)",
|
Usage: "Drop Linux capabilities (Set capabilities with 'CAP_' prefix)",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "seccomp",
|
Name: "seccomp",
|
||||||
Usage: "enable the default seccomp profile",
|
Usage: "Enable the default seccomp profile",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "seccomp-profile",
|
Name: "seccomp-profile",
|
||||||
Usage: "file path to custom seccomp profile. seccomp must be set to true, before using seccomp-profile",
|
Usage: "File path to custom seccomp profile. seccomp must be set to true, before using seccomp-profile",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "apparmor-default-profile",
|
Name: "apparmor-default-profile",
|
||||||
Usage: "enable AppArmor with the default profile with the specified name, e.g. \"cri-containerd.apparmor.d\"",
|
Usage: "Enable AppArmor with the default profile with the specified name, e.g. \"cri-containerd.apparmor.d\"",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "apparmor-profile",
|
Name: "apparmor-profile",
|
||||||
Usage: "enable AppArmor with an existing custom profile",
|
Usage: "Enable AppArmor with an existing custom profile",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "blockio-config-file",
|
Name: "blockio-config-file",
|
||||||
Usage: "file path to blockio class definitions. By default class definitions are not loaded.",
|
Usage: "File path to blockio class definitions. By default class definitions are not loaded.",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "blockio-class",
|
Name: "blockio-class",
|
||||||
Usage: "name of the blockio class to associate the container with",
|
Usage: "Name of the blockio class to associate the container with",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "rdt-class",
|
Name: "rdt-class",
|
||||||
Usage: "name of the RDT class to associate the container with. Specifies a Class of Service (CLOS) for cache and memory bandwidth management.",
|
Usage: "Name of the RDT class to associate the container with. Specifies a Class of Service (CLOS) for cache and memory bandwidth management.",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "hostname",
|
Name: "hostname",
|
||||||
Usage: "set the container's host name",
|
Usage: "Set the container's host name",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "user,u",
|
Name: "user,u",
|
||||||
Usage: "username or user id, group optional (format: <name|uid>[:<group|gid>])",
|
Usage: "Username or user id, group optional (format: <name|uid>[:<group|gid>])",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -25,22 +25,22 @@ import (
|
|||||||
func init() {
|
func init() {
|
||||||
ContainerFlags = append(ContainerFlags, cli.BoolFlag{
|
ContainerFlags = append(ContainerFlags, cli.BoolFlag{
|
||||||
Name: "rootfs",
|
Name: "rootfs",
|
||||||
Usage: "use custom rootfs that is not managed by containerd snapshotter",
|
Usage: "Use custom rootfs that is not managed by containerd snapshotter",
|
||||||
}, cli.BoolFlag{
|
}, cli.BoolFlag{
|
||||||
Name: "no-pivot",
|
Name: "no-pivot",
|
||||||
Usage: "disable use of pivot-root (linux only)",
|
Usage: "Disable use of pivot-root (linux only)",
|
||||||
}, cli.Int64Flag{
|
}, cli.Int64Flag{
|
||||||
Name: "cpu-quota",
|
Name: "cpu-quota",
|
||||||
Usage: "limit CPU CFS quota",
|
Usage: "Limit CPU CFS quota",
|
||||||
Value: -1,
|
Value: -1,
|
||||||
}, cli.Uint64Flag{
|
}, cli.Uint64Flag{
|
||||||
Name: "cpu-period",
|
Name: "cpu-period",
|
||||||
Usage: "limit CPU CFS period",
|
Usage: "Limit CPU CFS period",
|
||||||
}, cli.StringFlag{
|
}, cli.StringFlag{
|
||||||
Name: "rootfs-propagation",
|
Name: "rootfs-propagation",
|
||||||
Usage: "set the propagation of the container rootfs",
|
Usage: "Set the propagation of the container rootfs",
|
||||||
}, cli.StringSliceFlag{
|
}, cli.StringSliceFlag{
|
||||||
Name: "device",
|
Name: "device",
|
||||||
Usage: "file path to a device to add to the container; or a path to a directory tree of devices to add to the container",
|
Usage: "File path to a device to add to the container; or a path to a directory tree of devices to add to the container",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ func init() {
|
|||||||
ContainerFlags = append(ContainerFlags,
|
ContainerFlags = append(ContainerFlags,
|
||||||
cli.Uint64Flag{
|
cli.Uint64Flag{
|
||||||
Name: "cpu-count",
|
Name: "cpu-count",
|
||||||
Usage: "number of CPUs available to the container",
|
Usage: "Number of CPUs available to the container",
|
||||||
},
|
},
|
||||||
cli.Uint64Flag{
|
cli.Uint64Flag{
|
||||||
Name: "cpu-shares",
|
Name: "cpu-shares",
|
||||||
@ -35,6 +35,6 @@ func init() {
|
|||||||
Usage: "The number of processor cycles threads in a container can use per 10,000 cycles. Set to a percentage times 100. Between 1 and 10,000",
|
Usage: "The number of processor cycles threads in a container can use per 10,000 cycles. Set to a percentage times 100. Between 1 and 10,000",
|
||||||
}, cli.StringSliceFlag{
|
}, cli.StringSliceFlag{
|
||||||
Name: "device",
|
Name: "device",
|
||||||
Usage: "identifier of a device to add to the container (e.g. class://5B45201D-F2F2-4F3B-85BB-30FF1F953599)",
|
Usage: "Identifier of a device to add to the container (e.g. class://5B45201D-F2F2-4F3B-85BB-30FF1F953599)",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -33,15 +33,15 @@ var checkpointCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "rw",
|
Name: "rw",
|
||||||
Usage: "include the rw layer in the checkpoint",
|
Usage: "Include the rw layer in the checkpoint",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "image",
|
Name: "image",
|
||||||
Usage: "include the image in the checkpoint",
|
Usage: "Include the image in the checkpoint",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "task",
|
Name: "task",
|
||||||
Usage: "checkpoint container task",
|
Usage: "Checkpoint container task",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -99,7 +99,7 @@ var listCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "quiet, q",
|
Name: "quiet, q",
|
||||||
Usage: "print only the container id",
|
Usage: "Print only the container id",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -153,7 +153,7 @@ var deleteCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "keep-snapshot",
|
Name: "keep-snapshot",
|
||||||
Usage: "do not clean up snapshot with container",
|
Usage: "Do not clean up snapshot with container",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -251,7 +251,7 @@ var infoCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "spec",
|
Name: "spec",
|
||||||
Usage: "only display the spec",
|
Usage: "Only display the spec",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -36,11 +36,11 @@ var restoreCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "rw",
|
Name: "rw",
|
||||||
Usage: "restore the rw layer from the checkpoint",
|
Usage: "Restore the rw layer from the checkpoint",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "live",
|
Name: "live",
|
||||||
Usage: "restore the runtime and memory data from the checkpoint",
|
Usage: "Restore the runtime and memory data from the checkpoint",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -42,7 +42,7 @@ var (
|
|||||||
// Command is the cli command for managing content
|
// Command is the cli command for managing content
|
||||||
Command = cli.Command{
|
Command = cli.Command{
|
||||||
Name: "content",
|
Name: "content",
|
||||||
Usage: "manage content",
|
Usage: "Manage content",
|
||||||
Subcommands: cli.Commands{
|
Subcommands: cli.Commands{
|
||||||
activeIngestCommand,
|
activeIngestCommand,
|
||||||
deleteCommand,
|
deleteCommand,
|
||||||
@ -96,11 +96,11 @@ var (
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.Int64Flag{
|
cli.Int64Flag{
|
||||||
Name: "expected-size",
|
Name: "expected-size",
|
||||||
Usage: "validate against provided size",
|
Usage: "Validate against provided size",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "expected-digest",
|
Name: "expected-digest",
|
||||||
Usage: "verify content against expected digest",
|
Usage: "Verify content against expected digest",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -143,7 +143,7 @@ var (
|
|||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "root",
|
Name: "root",
|
||||||
Usage: "path to content store root",
|
Usage: "Path to content store root",
|
||||||
Value: "/tmp/content", // TODO(stevvooe): for now, just use the PWD/.content
|
Value: "/tmp/content", // TODO(stevvooe): for now, just use the PWD/.content
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -181,7 +181,7 @@ var (
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "quiet, q",
|
Name: "quiet, q",
|
||||||
Usage: "print only the blob digest",
|
Usage: "Print only the blob digest",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -294,7 +294,7 @@ var (
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "validate",
|
Name: "validate",
|
||||||
Usage: "validate the result against a format (json, mediatype, etc.)",
|
Usage: "Validate the result against a format (json, mediatype, etc.)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "editor",
|
Name: "editor",
|
||||||
|
@ -37,17 +37,17 @@ const (
|
|||||||
var pruneFlags = []cli.Flag{
|
var pruneFlags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "async",
|
Name: "async",
|
||||||
Usage: "allow garbage collection to cleanup asynchronously",
|
Usage: "Allow garbage collection to cleanup asynchronously",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "dry",
|
Name: "dry",
|
||||||
Usage: "just show updates without applying (enables debug logging)",
|
Usage: "Just show updates without applying (enables debug logging)",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var pruneCommand = cli.Command{
|
var pruneCommand = cli.Command{
|
||||||
Name: "prune",
|
Name: "prune",
|
||||||
Usage: "prunes content from the content store",
|
Usage: "Prunes content from the content store",
|
||||||
Subcommands: cli.Commands{
|
Subcommands: cli.Commands{
|
||||||
pruneReferencesCommand,
|
pruneReferencesCommand,
|
||||||
},
|
},
|
||||||
@ -55,7 +55,7 @@ var pruneCommand = cli.Command{
|
|||||||
|
|
||||||
var pruneReferencesCommand = cli.Command{
|
var pruneReferencesCommand = cli.Command{
|
||||||
Name: "references",
|
Name: "references",
|
||||||
Usage: "prunes preference labels from the content store (layers only by default)",
|
Usage: "Prunes preference labels from the content store (layers only by default)",
|
||||||
Flags: pruneFlags,
|
Flags: pruneFlags,
|
||||||
Action: func(clicontext *cli.Context) error {
|
Action: func(clicontext *cli.Context) error {
|
||||||
client, ctx, cancel, err := commands.NewClient(clicontext)
|
client, ctx, cancel, err := commands.NewClient(clicontext)
|
||||||
|
@ -43,11 +43,11 @@ When '--all-platforms' is given all images in a manifest list must be available.
|
|||||||
// generic flags
|
// generic flags
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "uncompress",
|
Name: "uncompress",
|
||||||
Usage: "convert tar.gz layers to uncompressed tar layers",
|
Usage: "Convert tar.gz layers to uncompressed tar layers",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "oci",
|
Name: "oci",
|
||||||
Usage: "convert Docker media types to OCI media types",
|
Usage: "Convert Docker media types to OCI media types",
|
||||||
},
|
},
|
||||||
// platform flags
|
// platform flags
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
@ -57,7 +57,7 @@ When '--all-platforms' is given all images in a manifest list must be available.
|
|||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "all-platforms",
|
Name: "all-platforms",
|
||||||
Usage: "exports content from all platforms",
|
Usage: "Exports content from all platforms",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -43,11 +43,11 @@ When '--all-platforms' is given all images in a manifest list must be available.
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "skip-manifest-json",
|
Name: "skip-manifest-json",
|
||||||
Usage: "do not add Docker compatible manifest.json to archive",
|
Usage: "Do not add Docker compatible manifest.json to archive",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "skip-non-distributable",
|
Name: "skip-non-distributable",
|
||||||
Usage: "do not add non-distributable blobs such as Windows layers to archive",
|
Usage: "Do not add non-distributable blobs such as Windows layers to archive",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "platform",
|
Name: "platform",
|
||||||
@ -56,7 +56,7 @@ When '--all-platforms' is given all images in a manifest list must be available.
|
|||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "all-platforms",
|
Name: "all-platforms",
|
||||||
Usage: "exports content from all platforms",
|
Usage: "Exports content from all platforms",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -64,7 +64,7 @@ var listCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "quiet, q",
|
Name: "quiet, q",
|
||||||
Usage: "print only the image refs",
|
Usage: "Print only the image refs",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -147,7 +147,7 @@ var setLabelsCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "replace-all, r",
|
Name: "replace-all, r",
|
||||||
Usage: "replace all labels",
|
Usage: "Replace all labels",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -206,7 +206,7 @@ var checkCommand = cli.Command{
|
|||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "quiet, q",
|
Name: "quiet, q",
|
||||||
Usage: "print only the ready image refs (fully downloaded and unpacked)",
|
Usage: "Print only the ready image refs (fully downloaded and unpacked)",
|
||||||
},
|
},
|
||||||
}, commands.SnapshotterFlags...),
|
}, commands.SnapshotterFlags...),
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -359,11 +359,11 @@ var removeCommand = cli.Command{
|
|||||||
|
|
||||||
var pruneCommand = cli.Command{
|
var pruneCommand = cli.Command{
|
||||||
Name: "prune",
|
Name: "prune",
|
||||||
Usage: "remove unused images",
|
Usage: "Remove unused images",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "all", // TODO: add more filters
|
Name: "all", // TODO: add more filters
|
||||||
Usage: "remove all unused images, not just dangling ones (if all is not specified no images will be pruned)",
|
Usage: "Remove all unused images, not just dangling ones (if all is not specified no images will be pruned)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// adapted from `nerdctl`:
|
// adapted from `nerdctl`:
|
||||||
|
@ -58,43 +58,43 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
|
|||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "base-name",
|
Name: "base-name",
|
||||||
Value: "",
|
Value: "",
|
||||||
Usage: "base image name for added images, when provided only images with this name prefix are imported",
|
Usage: "Base image name for added images, when provided only images with this name prefix are imported",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "digests",
|
Name: "digests",
|
||||||
Usage: "whether to create digest images (default: false)",
|
Usage: "Whether to create digest images (default: false)",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "skip-digest-for-named",
|
Name: "skip-digest-for-named",
|
||||||
Usage: "skip applying --digests option to images named in the importing tar (use it in conjunction with --digests)",
|
Usage: "Skip applying --digests option to images named in the importing tar (use it in conjunction with --digests)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "index-name",
|
Name: "index-name",
|
||||||
Usage: "image name to keep index as, by default index is discarded",
|
Usage: "Image name to keep index as, by default index is discarded",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "all-platforms",
|
Name: "all-platforms",
|
||||||
Usage: "imports content for all platforms, false by default",
|
Usage: "Imports content for all platforms, false by default",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "platform",
|
Name: "platform",
|
||||||
Usage: "imports content for specific platform",
|
Usage: "Imports content for specific platform",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "no-unpack",
|
Name: "no-unpack",
|
||||||
Usage: "skip unpacking the images, cannot be used with --discard-unpacked-layers, false by default",
|
Usage: "Skip unpacking the images, cannot be used with --discard-unpacked-layers, false by default",
|
||||||
},
|
},
|
||||||
cli.BoolTFlag{
|
cli.BoolTFlag{
|
||||||
Name: "local",
|
Name: "local",
|
||||||
Usage: "run import locally rather than through transfer API",
|
Usage: "Run import locally rather than through transfer API",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "compress-blobs",
|
Name: "compress-blobs",
|
||||||
Usage: "compress uncompressed blobs when creating manifest (Docker format only)",
|
Usage: "Compress uncompressed blobs when creating manifest (Docker format only)",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "discard-unpacked-layers",
|
Name: "discard-unpacked-layers",
|
||||||
Usage: "allow the garbage collector to clean layers up from the content store after unpacking, cannot be used with --no-unpack, false by default",
|
Usage: "Allow the garbage collector to clean layers up from the content store after unpacking, cannot be used with --no-unpack, false by default",
|
||||||
},
|
},
|
||||||
}, commands.SnapshotterFlags...),
|
}, commands.SnapshotterFlags...),
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ When you are done, use the unmount command.
|
|||||||
Flags: append(append(commands.RegistryFlags, append(commands.SnapshotterFlags, commands.LabelFlag)...),
|
Flags: append(append(commands.RegistryFlags, append(commands.SnapshotterFlags, commands.LabelFlag)...),
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "rw",
|
Name: "rw",
|
||||||
Usage: "enable write support on the mount",
|
Usage: "Enable write support on the mount",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "platform",
|
Name: "platform",
|
||||||
Usage: "mount the image for the specified platform",
|
Usage: "Mount the image for the specified platform",
|
||||||
Value: platforms.DefaultString(),
|
Value: platforms.DefaultString(),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -58,24 +58,24 @@ var pushCommand = cli.Command{
|
|||||||
`,
|
`,
|
||||||
Flags: append(commands.RegistryFlags, cli.StringFlag{
|
Flags: append(commands.RegistryFlags, cli.StringFlag{
|
||||||
Name: "manifest",
|
Name: "manifest",
|
||||||
Usage: "digest of manifest",
|
Usage: "Digest of manifest",
|
||||||
}, cli.StringFlag{
|
}, cli.StringFlag{
|
||||||
Name: "manifest-type",
|
Name: "manifest-type",
|
||||||
Usage: "media type of manifest digest",
|
Usage: "Media type of manifest digest",
|
||||||
Value: ocispec.MediaTypeImageManifest,
|
Value: ocispec.MediaTypeImageManifest,
|
||||||
}, cli.StringSliceFlag{
|
}, cli.StringSliceFlag{
|
||||||
Name: "platform",
|
Name: "platform",
|
||||||
Usage: "push content from a specific platform",
|
Usage: "Push content from a specific platform",
|
||||||
Value: &cli.StringSlice{},
|
Value: &cli.StringSlice{},
|
||||||
}, cli.IntFlag{
|
}, cli.IntFlag{
|
||||||
Name: "max-concurrent-uploaded-layers",
|
Name: "max-concurrent-uploaded-layers",
|
||||||
Usage: "set the max concurrent uploaded layers for each push",
|
Usage: "Set the max concurrent uploaded layers for each push",
|
||||||
}, cli.BoolTFlag{
|
}, cli.BoolTFlag{
|
||||||
Name: "local",
|
Name: "local",
|
||||||
Usage: "push content from local client rather than using transfer service",
|
Usage: "Push content from local client rather than using transfer service",
|
||||||
}, cli.BoolFlag{
|
}, cli.BoolFlag{
|
||||||
Name: "allow-non-distributable-blobs",
|
Name: "allow-non-distributable-blobs",
|
||||||
Usage: "allow pushing blobs that are marked as non-distributable",
|
Usage: "Allow pushing blobs that are marked as non-distributable",
|
||||||
}),
|
}),
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
var (
|
var (
|
||||||
|
@ -32,7 +32,7 @@ var tagCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "force",
|
Name: "force",
|
||||||
Usage: "force target_ref to be created, regardless if it already exists",
|
Usage: "Force target_ref to be created, regardless if it already exists",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -34,7 +34,7 @@ var unmountCommand = cli.Command{
|
|||||||
Flags: append(append(commands.RegistryFlags, append(commands.SnapshotterFlags, commands.LabelFlag)...),
|
Flags: append(append(commands.RegistryFlags, append(commands.SnapshotterFlags, commands.LabelFlag)...),
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "rm",
|
Name: "rm",
|
||||||
Usage: "remove the snapshot after a successful unmount",
|
Usage: "Remove the snapshot after a successful unmount",
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -30,7 +30,7 @@ type Info struct {
|
|||||||
// Command is a cli command to output the containerd server info
|
// Command is a cli command to output the containerd server info
|
||||||
var Command = cli.Command{
|
var Command = cli.Command{
|
||||||
Name: "info",
|
Name: "info",
|
||||||
Usage: "print the server info",
|
Usage: "Print the server info",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
client, ctx, cancel, err := commands.NewClient(context)
|
client, ctx, cancel, err := commands.NewClient(context)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -31,15 +31,15 @@ var Command = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "libs,l",
|
Name: "libs,l",
|
||||||
Usage: "install libs from the image",
|
Usage: "Install libs from the image",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "replace,r",
|
Name: "replace,r",
|
||||||
Usage: "replace any binaries or libs in the opt directory",
|
Usage: "Replace any binaries or libs in the opt directory",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "path",
|
Name: "path",
|
||||||
Usage: "set an optional install path other than the managed opt directory",
|
Usage: "Set an optional install path other than the managed opt directory",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -32,7 +32,7 @@ import (
|
|||||||
// Command is the cli command for managing content
|
// Command is the cli command for managing content
|
||||||
var Command = cli.Command{
|
var Command = cli.Command{
|
||||||
Name: "leases",
|
Name: "leases",
|
||||||
Usage: "manage leases",
|
Usage: "Manage leases",
|
||||||
Subcommands: cli.Commands{
|
Subcommands: cli.Commands{
|
||||||
listCommand,
|
listCommand,
|
||||||
createCommand,
|
createCommand,
|
||||||
@ -50,7 +50,7 @@ var listCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "quiet, q",
|
Name: "quiet, q",
|
||||||
Usage: "print only the blob digest",
|
Usage: "Print only the blob digest",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -107,11 +107,11 @@ var createCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "id",
|
Name: "id",
|
||||||
Usage: "set the id for the lease, will be generated by default",
|
Usage: "Set the id for the lease, will be generated by default",
|
||||||
},
|
},
|
||||||
cli.DurationFlag{
|
cli.DurationFlag{
|
||||||
Name: "expires, x",
|
Name: "expires, x",
|
||||||
Usage: "expiration of lease (0 value will not expire)",
|
Usage: "Expiration of lease (0 value will not expire)",
|
||||||
Value: 24 * time.Hour,
|
Value: 24 * time.Hour,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -98,7 +98,7 @@ var listCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "quiet, q",
|
Name: "quiet, q",
|
||||||
Usage: "print only the namespace name",
|
Usage: "Print only the namespace name",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -150,7 +150,7 @@ var removeCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "cgroup,c",
|
Name: "cgroup,c",
|
||||||
Usage: "delete the namespace's cgroup",
|
Usage: "Delete the namespace's cgroup",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -38,11 +38,11 @@ var Command = cli.Command{
|
|||||||
|
|
||||||
var defaultSpecCommand = cli.Command{
|
var defaultSpecCommand = cli.Command{
|
||||||
Name: "spec",
|
Name: "spec",
|
||||||
Usage: "see the output of the default OCI spec",
|
Usage: "See the output of the default OCI spec",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "platform",
|
Name: "platform",
|
||||||
Usage: "platform of the spec to print (Examples: 'linux/arm64', 'windows/amd64')",
|
Usage: "Platform of the spec to print (Examples: 'linux/arm64', 'windows/amd64')",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -49,11 +49,11 @@ var listCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "quiet,q",
|
Name: "quiet,q",
|
||||||
Usage: "print only the plugin ids",
|
Usage: "Print only the plugin ids",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "detailed,d",
|
Name: "detailed,d",
|
||||||
Usage: "print detailed information about each plugin",
|
Usage: "Print detailed information about each plugin",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -35,11 +35,11 @@ type pprofDialer struct {
|
|||||||
// Command is the cli command for providing golang pprof outputs for containerd
|
// Command is the cli command for providing golang pprof outputs for containerd
|
||||||
var Command = cli.Command{
|
var Command = cli.Command{
|
||||||
Name: "pprof",
|
Name: "pprof",
|
||||||
Usage: "provide golang pprof outputs for containerd",
|
Usage: "Provide golang pprof outputs for containerd",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "debug-socket, d",
|
Name: "debug-socket, d",
|
||||||
Usage: "socket path for containerd's debug server",
|
Usage: "Socket path for containerd's debug server",
|
||||||
Value: defaults.DefaultDebugAddress,
|
Value: defaults.DefaultDebugAddress,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -55,11 +55,11 @@ var Command = cli.Command{
|
|||||||
|
|
||||||
var pprofGoroutinesCommand = cli.Command{
|
var pprofGoroutinesCommand = cli.Command{
|
||||||
Name: "goroutines",
|
Name: "goroutines",
|
||||||
Usage: "dump goroutine stack dump",
|
Usage: "Dump goroutine stack dump",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
Usage: "debug pprof args",
|
Usage: "Debug pprof args",
|
||||||
Value: 2,
|
Value: 2,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -79,11 +79,11 @@ var pprofGoroutinesCommand = cli.Command{
|
|||||||
|
|
||||||
var pprofHeapCommand = cli.Command{
|
var pprofHeapCommand = cli.Command{
|
||||||
Name: "heap",
|
Name: "heap",
|
||||||
Usage: "dump heap profile",
|
Usage: "Dump heap profile",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
Usage: "debug pprof args",
|
Usage: "Debug pprof args",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -107,12 +107,12 @@ var pprofProfileCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.DurationFlag{
|
cli.DurationFlag{
|
||||||
Name: "seconds,s",
|
Name: "seconds,s",
|
||||||
Usage: "duration for collection (seconds)",
|
Usage: "Duration for collection (seconds)",
|
||||||
Value: 30 * time.Second,
|
Value: 30 * time.Second,
|
||||||
},
|
},
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
Usage: "debug pprof args",
|
Usage: "Debug pprof args",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -137,12 +137,12 @@ var pprofTraceCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.DurationFlag{
|
cli.DurationFlag{
|
||||||
Name: "seconds,s",
|
Name: "seconds,s",
|
||||||
Usage: "trace time (seconds)",
|
Usage: "Trace time (seconds)",
|
||||||
Value: 5 * time.Second,
|
Value: 5 * time.Second,
|
||||||
},
|
},
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
Usage: "debug pprof args",
|
Usage: "Debug pprof args",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -168,7 +168,7 @@ var pprofBlockCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
Usage: "debug pprof args",
|
Usage: "Debug pprof args",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -188,11 +188,11 @@ var pprofBlockCommand = cli.Command{
|
|||||||
|
|
||||||
var pprofThreadcreateCommand = cli.Command{
|
var pprofThreadcreateCommand = cli.Command{
|
||||||
Name: "threadcreate",
|
Name: "threadcreate",
|
||||||
Usage: "goroutine thread creating profile",
|
Usage: "Goroutine thread creating profile",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
Name: "debug",
|
Name: "debug",
|
||||||
Usage: "debug pprof args",
|
Usage: "Debug pprof args",
|
||||||
Value: 0,
|
Value: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -93,35 +93,35 @@ var Command = cli.Command{
|
|||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "rm",
|
Name: "rm",
|
||||||
Usage: "remove the container after running, cannot be used with --detach",
|
Usage: "Remove the container after running, cannot be used with --detach",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "null-io",
|
Name: "null-io",
|
||||||
Usage: "send all IO to /dev/null",
|
Usage: "Send all IO to /dev/null",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "log-uri",
|
Name: "log-uri",
|
||||||
Usage: "log uri",
|
Usage: "Log uri",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "detach,d",
|
Name: "detach,d",
|
||||||
Usage: "detach from the task after it has started execution, cannot be used with --rm",
|
Usage: "Detach from the task after it has started execution, cannot be used with --rm",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "fifo-dir",
|
Name: "fifo-dir",
|
||||||
Usage: "directory used for storing IO FIFOs",
|
Usage: "Directory used for storing IO FIFOs",
|
||||||
},
|
},
|
||||||
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)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "platform",
|
Name: "platform",
|
||||||
Usage: "run image for specific platform",
|
Usage: "Run image for specific platform",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "cni",
|
Name: "cni",
|
||||||
Usage: "enable cni networking for the container",
|
Usage: "Enable cni networking for the container",
|
||||||
},
|
},
|
||||||
}, append(platformRunFlags,
|
}, append(platformRunFlags,
|
||||||
append(append(commands.SnapshotterFlags, []cli.Flag{commands.SnapshotterLabels}...),
|
append(append(commands.SnapshotterFlags, []cli.Flag{commands.SnapshotterLabels}...),
|
||||||
|
@ -47,40 +47,40 @@ import (
|
|||||||
var platformRunFlags = []cli.Flag{
|
var platformRunFlags = []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "runc-binary",
|
Name: "runc-binary",
|
||||||
Usage: "specify runc-compatible binary",
|
Usage: "Specify runc-compatible binary",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "runc-root",
|
Name: "runc-root",
|
||||||
Usage: "specify runc-compatible root",
|
Usage: "Specify runc-compatible root",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "runc-systemd-cgroup",
|
Name: "runc-systemd-cgroup",
|
||||||
Usage: "start runc with systemd cgroup manager",
|
Usage: "Start runc with systemd cgroup manager",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "uidmap",
|
Name: "uidmap",
|
||||||
Usage: "run inside a user namespace with the specified UID mapping range; specified with the format `container-uid:host-uid:length`",
|
Usage: "Run inside a user namespace with the specified UID mapping range; specified with the format `container-uid:host-uid:length`",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "gidmap",
|
Name: "gidmap",
|
||||||
Usage: "run inside a user namespace with the specified GID mapping range; specified with the format `container-gid:host-gid:length`",
|
Usage: "Run inside a user namespace with the specified GID mapping range; specified with the format `container-gid:host-gid:length`",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "remap-labels",
|
Name: "remap-labels",
|
||||||
Usage: "provide the user namespace ID remapping to the snapshotter via label options; requires snapshotter support",
|
Usage: "Provide the user namespace ID remapping to the snapshotter via label options; requires snapshotter support",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "privileged-without-host-devices",
|
Name: "privileged-without-host-devices",
|
||||||
Usage: "don't pass all host devices to privileged container",
|
Usage: "Don't pass all host devices to privileged container",
|
||||||
},
|
},
|
||||||
cli.Float64Flag{
|
cli.Float64Flag{
|
||||||
Name: "cpus",
|
Name: "cpus",
|
||||||
Usage: "set the CFS cpu quota",
|
Usage: "Set the CFS cpu quota",
|
||||||
Value: 0.0,
|
Value: 0.0,
|
||||||
},
|
},
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "cpu-shares",
|
Name: "cpu-shares",
|
||||||
Usage: "set the cpu shares",
|
Usage: "Set the cpu shares",
|
||||||
Value: 1024,
|
Value: 1024,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ var runCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "runtime",
|
Name: "runtime",
|
||||||
Usage: "runtime name",
|
Usage: "Runtime name",
|
||||||
Value: defaults.DefaultRuntime,
|
Value: defaults.DefaultRuntime,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -104,7 +104,7 @@ var listCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "filters",
|
Name: "filters",
|
||||||
Usage: "the list of filters to apply when querying sandboxes from the store",
|
Usage: "The list of filters to apply when querying sandboxes from the store",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -151,7 +151,7 @@ var removeCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "force, f",
|
Name: "force, f",
|
||||||
Usage: "ignore shutdown errors when removing sandbox",
|
Usage: "Ignore shutdown errors when removing sandbox",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -43,30 +43,30 @@ import (
|
|||||||
var fifoFlags = []cli.Flag{
|
var fifoFlags = []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "stdin",
|
Name: "stdin",
|
||||||
Usage: "specify the path to the stdin fifo",
|
Usage: "Specify the path to the stdin fifo",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "stdout",
|
Name: "stdout",
|
||||||
Usage: "specify the path to the stdout fifo",
|
Usage: "Specify the path to the stdout fifo",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "stderr",
|
Name: "stderr",
|
||||||
Usage: "specify the path to the stderr fifo",
|
Usage: "Specify the path to the stderr fifo",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "tty,t",
|
Name: "tty,t",
|
||||||
Usage: "enable tty support",
|
Usage: "Enable tty support",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Command is the cli command for interacting with a task
|
// Command is the cli command for interacting with a task
|
||||||
var Command = cli.Command{
|
var Command = cli.Command{
|
||||||
Name: "shim",
|
Name: "shim",
|
||||||
Usage: "interact with a shim directly",
|
Usage: "Interact with a shim directly",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "id",
|
Name: "id",
|
||||||
Usage: "container id",
|
Usage: "Container id",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
@ -79,7 +79,7 @@ var Command = cli.Command{
|
|||||||
|
|
||||||
var startCommand = cli.Command{
|
var startCommand = cli.Command{
|
||||||
Name: "start",
|
Name: "start",
|
||||||
Usage: "start a container with a task",
|
Usage: "Start a container with a task",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
service, err := getTaskService(context)
|
service, err := getTaskService(context)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -94,7 +94,7 @@ var startCommand = cli.Command{
|
|||||||
|
|
||||||
var deleteCommand = cli.Command{
|
var deleteCommand = cli.Command{
|
||||||
Name: "delete",
|
Name: "delete",
|
||||||
Usage: "delete a container with a task",
|
Usage: "Delete a container with a task",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
service, err := getTaskService(context)
|
service, err := getTaskService(context)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -113,7 +113,7 @@ var deleteCommand = cli.Command{
|
|||||||
|
|
||||||
var stateCommand = cli.Command{
|
var stateCommand = cli.Command{
|
||||||
Name: "state",
|
Name: "state",
|
||||||
Usage: "get the state of all the processes of the task",
|
Usage: "Get the state of all the processes of the task",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
service, err := getTaskService(context)
|
service, err := getTaskService(context)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -132,24 +132,24 @@ var stateCommand = cli.Command{
|
|||||||
|
|
||||||
var execCommand = cli.Command{
|
var execCommand = cli.Command{
|
||||||
Name: "exec",
|
Name: "exec",
|
||||||
Usage: "exec a new process in the task's container",
|
Usage: "Exec a new process in the task's container",
|
||||||
Flags: append(fifoFlags,
|
Flags: append(fifoFlags,
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "attach,a",
|
Name: "attach,a",
|
||||||
Usage: "stay attached to the container and open the fifos",
|
Usage: "Stay attached to the container and open the fifos",
|
||||||
},
|
},
|
||||||
cli.StringSliceFlag{
|
cli.StringSliceFlag{
|
||||||
Name: "env,e",
|
Name: "env,e",
|
||||||
Usage: "add environment vars",
|
Usage: "Add environment vars",
|
||||||
Value: &cli.StringSlice{},
|
Value: &cli.StringSlice{},
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "cwd",
|
Name: "cwd",
|
||||||
Usage: "current working directory",
|
Usage: "Current working directory",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "spec",
|
Name: "spec",
|
||||||
Usage: "runtime spec",
|
Usage: "Runtime spec",
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -98,16 +98,16 @@ var diffCommand = cli.Command{
|
|||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "media-type",
|
Name: "media-type",
|
||||||
Usage: "media type to use for creating diff",
|
Usage: "Media type to use for creating diff",
|
||||||
Value: ocispec.MediaTypeImageLayerGzip,
|
Value: ocispec.MediaTypeImageLayerGzip,
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "ref",
|
Name: "ref",
|
||||||
Usage: "content upload reference to use",
|
Usage: "Content upload reference to use",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "keep",
|
Name: "keep",
|
||||||
Usage: "keep diff content. up to creator to delete it.",
|
Usage: "Keep diff content. up to creator to delete it.",
|
||||||
},
|
},
|
||||||
}, commands.LabelFlag),
|
}, commands.LabelFlag),
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -200,7 +200,7 @@ var usageCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "b",
|
Name: "b",
|
||||||
Usage: "display size in bytes",
|
Usage: "Display size in bytes",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -279,11 +279,11 @@ var prepareCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "target, t",
|
Name: "target, t",
|
||||||
Usage: "mount target path, will print mount, if provided",
|
Usage: "Mount target path, will print mount, if provided",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "mounts",
|
Name: "mounts",
|
||||||
Usage: "print out snapshot mounts as JSON",
|
Usage: "Print out snapshot mounts as JSON",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -330,11 +330,11 @@ var viewCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "target, t",
|
Name: "target, t",
|
||||||
Usage: "mount target path, will print mount, if provided",
|
Usage: "Mount target path, will print mount, if provided",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "mounts",
|
Name: "mounts",
|
||||||
Usage: "print out snapshot mounts as JSON",
|
Usage: "Print out snapshot mounts as JSON",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
@ -427,7 +427,7 @@ var commitCommand = cli.Command{
|
|||||||
|
|
||||||
var treeCommand = cli.Command{
|
var treeCommand = cli.Command{
|
||||||
Name: "tree",
|
Name: "tree",
|
||||||
Usage: "display tree view of snapshot branches",
|
Usage: "Display tree view of snapshot branches",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
client, ctx, cancel, err := commands.NewClient(context)
|
client, ctx, cancel, err := commands.NewClient(context)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -35,15 +35,15 @@ var checkpointCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "exit",
|
Name: "exit",
|
||||||
Usage: "stop the container after the checkpoint",
|
Usage: "Stop the container after the checkpoint",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "image-path",
|
Name: "image-path",
|
||||||
Usage: "path to criu image files",
|
Usage: "Path to criu image files",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "work-path",
|
Name: "work-path",
|
||||||
Usage: "path to criu work files and logs",
|
Usage: "Path to criu work files and logs",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -34,11 +34,11 @@ var deleteCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "force, f",
|
Name: "force, f",
|
||||||
Usage: "force delete task process",
|
Usage: "Force delete task process",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "exec-id",
|
Name: "exec-id",
|
||||||
Usage: "process ID to kill",
|
Usage: "Process ID to kill",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -39,32 +39,32 @@ var execCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "cwd",
|
Name: "cwd",
|
||||||
Usage: "working directory of the new process",
|
Usage: "Working directory of the new process",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "tty,t",
|
Name: "tty,t",
|
||||||
Usage: "allocate a TTY for the container",
|
Usage: "Allocate a TTY for the container",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "detach,d",
|
Name: "detach,d",
|
||||||
Usage: "detach from the task after it has started execution",
|
Usage: "Detach from the task after it has started execution",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "exec-id",
|
Name: "exec-id",
|
||||||
Required: true,
|
Required: true,
|
||||||
Usage: "exec specific id for the process",
|
Usage: "Exec specific id for the process",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "fifo-dir",
|
Name: "fifo-dir",
|
||||||
Usage: "directory used for storing IO FIFOs",
|
Usage: "Directory used for storing IO FIFOs",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "log-uri",
|
Name: "log-uri",
|
||||||
Usage: "log uri for custom shim logging",
|
Usage: "Log uri for custom shim logging",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "user",
|
Name: "user",
|
||||||
Usage: "user id or name",
|
Usage: "User id or name",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -69,15 +69,15 @@ var killCommand = cli.Command{
|
|||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "signal, s",
|
Name: "signal, s",
|
||||||
Value: "",
|
Value: "",
|
||||||
Usage: "signal to send to the container",
|
Usage: "Signal to send to the container",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "exec-id",
|
Name: "exec-id",
|
||||||
Usage: "process ID to kill",
|
Usage: "Process ID to kill",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "all, a",
|
Name: "all, a",
|
||||||
Usage: "send signal to all processes inside the container",
|
Usage: "Send signal to all processes inside the container",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -34,7 +34,7 @@ var listCommand = cli.Command{
|
|||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "quiet, q",
|
Name: "quiet, q",
|
||||||
Usage: "print only the task id",
|
Usage: "Print only the task id",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -34,23 +34,23 @@ var startCommand = cli.Command{
|
|||||||
Flags: append(platformStartFlags, []cli.Flag{
|
Flags: append(platformStartFlags, []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "null-io",
|
Name: "null-io",
|
||||||
Usage: "send all IO to /dev/null",
|
Usage: "Send all IO to /dev/null",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "log-uri",
|
Name: "log-uri",
|
||||||
Usage: "log uri",
|
Usage: "Log uri",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "fifo-dir",
|
Name: "fifo-dir",
|
||||||
Usage: "directory used for storing IO FIFOs",
|
Usage: "Directory used for storing IO FIFOs",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "pid-file",
|
Name: "pid-file",
|
||||||
Usage: "file path to write the task's pid",
|
Usage: "File path to write the task's pid",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "detach,d",
|
Name: "detach,d",
|
||||||
Usage: "detach from the task after it has started execution",
|
Usage: "Detach from the task after it has started execution",
|
||||||
},
|
},
|
||||||
}...),
|
}...),
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
|
@ -36,7 +36,7 @@ import (
|
|||||||
var platformStartFlags = []cli.Flag{
|
var platformStartFlags = []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "no-pivot",
|
Name: "no-pivot",
|
||||||
Usage: "disable use of pivot-root (linux only)",
|
Usage: "Disable use of pivot-root (linux only)",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
// Command is a cli command to output the client and containerd server version
|
// Command is a cli command to output the client and containerd server version
|
||||||
var Command = cli.Command{
|
var Command = cli.Command{
|
||||||
Name: "version",
|
Name: "version",
|
||||||
Usage: "print the client and server versions",
|
Usage: "Print the client and server versions",
|
||||||
Action: func(context *cli.Context) error {
|
Action: func(context *cli.Context) error {
|
||||||
fmt.Println("Client:")
|
fmt.Println("Client:")
|
||||||
fmt.Println(" Version: ", version.Version)
|
fmt.Println(" Version: ", version.Version)
|
||||||
|
Loading…
Reference in New Issue
Block a user