2018-11-09 09:10:41 -05:00
|
|
|
package context
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewContextCommand returns the context cli subcommand
|
|
|
|
func NewContextCommand(dockerCli command.Cli) *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "context",
|
|
|
|
Short: "Manage contexts",
|
|
|
|
Args: cli.NoArgs,
|
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
newCreateCommand(dockerCli),
|
|
|
|
newListCommand(dockerCli),
|
|
|
|
newUseCommand(dockerCli),
|
|
|
|
newExportCommand(dockerCli),
|
|
|
|
newImportCommand(dockerCli),
|
|
|
|
newRemoveCommand(dockerCli),
|
|
|
|
newUpdateCommand(dockerCli),
|
|
|
|
newInspectCommand(dockerCli),
|
2022-04-25 04:52:18 -04:00
|
|
|
newShowCommand(dockerCli),
|
2018-11-09 09:10:41 -05:00
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|