From a058f9774ac52204dfaf1dfd7e68c0a7237c862c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Mar 2022 23:47:45 +0200 Subject: [PATCH] remove exec, push, pull, ps, images, info from "legacy" commands These commands are commonly used, so removing them from the list of "legacy" top-level commands that are hidden when setting DOCKER_HIDE_LEGACY_COMMANDS=1 Signed-off-by: Sebastiaan van Stijn --- cli/command/commands/commands.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/command/commands/commands.go b/cli/command/commands/commands.go index cab0e18718..23a43568b5 100644 --- a/cli/command/commands/commands.go +++ b/cli/command/commands/commands.go @@ -30,11 +30,17 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) { cmd.AddCommand( // commonly used shorthands container.NewRunCommand(dockerCli), + container.NewExecCommand(dockerCli), + container.NewPsCommand(dockerCli), image.NewBuildCommand(dockerCli), + image.NewPullCommand(dockerCli), + image.NewPushCommand(dockerCli), + image.NewImagesCommand(dockerCli), registry.NewLoginCommand(dockerCli), registry.NewLogoutCommand(dockerCli), registry.NewSearchCommand(dockerCli), system.NewVersionCommand(dockerCli), + system.NewInfoCommand(dockerCli), // management commands builder.NewBuilderCommand(dockerCli), @@ -63,13 +69,11 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) { hide(container.NewCopyCommand(dockerCli)), hide(container.NewCreateCommand(dockerCli)), hide(container.NewDiffCommand(dockerCli)), - hide(container.NewExecCommand(dockerCli)), hide(container.NewExportCommand(dockerCli)), hide(container.NewKillCommand(dockerCli)), hide(container.NewLogsCommand(dockerCli)), hide(container.NewPauseCommand(dockerCli)), hide(container.NewPortCommand(dockerCli)), - hide(container.NewPsCommand(dockerCli)), hide(container.NewRenameCommand(dockerCli)), hide(container.NewRestartCommand(dockerCli)), hide(container.NewRmCommand(dockerCli)), @@ -81,16 +85,12 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) { hide(container.NewUpdateCommand(dockerCli)), hide(container.NewWaitCommand(dockerCli)), hide(image.NewHistoryCommand(dockerCli)), - hide(image.NewImagesCommand(dockerCli)), hide(image.NewImportCommand(dockerCli)), hide(image.NewLoadCommand(dockerCli)), - hide(image.NewPullCommand(dockerCli)), - hide(image.NewPushCommand(dockerCli)), hide(image.NewRemoveCommand(dockerCli)), hide(image.NewSaveCommand(dockerCli)), hide(image.NewTagCommand(dockerCli)), hide(system.NewEventsCommand(dockerCli)), - hide(system.NewInfoCommand(dockerCli)), hide(system.NewInspectCommand(dockerCli)), ) }