Merge pull request #6322 from Benehiko/command/context
Unexport context command
This commit is contained in:
@ -60,6 +60,7 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
|
||||
checkpoint.NewCheckpointCommand(dockerCli),
|
||||
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
|
||||
container.NewContainerCommand(dockerCli),
|
||||
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
|
||||
context.NewContextCommand(dockerCli),
|
||||
//nolint:staticcheck // TODO: Remove when migration to cli/internal/commands.Register is complete. (see #6283)
|
||||
image.NewImageCommand(dockerCli),
|
||||
|
||||
@ -7,23 +7,30 @@ import (
|
||||
)
|
||||
|
||||
// NewContextCommand returns the context cli subcommand
|
||||
func NewContextCommand(dockerCli command.Cli) *cobra.Command {
|
||||
//
|
||||
// Deprecated: Do not import commands directly. They will be removed in a future release.
|
||||
func NewContextCommand(dockerCLI command.Cli) *cobra.Command {
|
||||
return newContextCommand(dockerCLI)
|
||||
}
|
||||
|
||||
// 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()),
|
||||
RunE: command.ShowHelp(dockerCLI.Err()),
|
||||
}
|
||||
cmd.AddCommand(
|
||||
newCreateCommand(dockerCli),
|
||||
newListCommand(dockerCli),
|
||||
newUseCommand(dockerCli),
|
||||
newExportCommand(dockerCli),
|
||||
newImportCommand(dockerCli),
|
||||
newRemoveCommand(dockerCli),
|
||||
newUpdateCommand(dockerCli),
|
||||
newInspectCommand(dockerCli),
|
||||
newShowCommand(dockerCli),
|
||||
newCreateCommand(dockerCLI),
|
||||
newListCommand(dockerCLI),
|
||||
newUseCommand(dockerCLI),
|
||||
newExportCommand(dockerCLI),
|
||||
newImportCommand(dockerCLI),
|
||||
newRemoveCommand(dockerCLI),
|
||||
newUpdateCommand(dockerCLI),
|
||||
newInspectCommand(dockerCLI),
|
||||
newShowCommand(dockerCLI),
|
||||
)
|
||||
return cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user