Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions cli/command/builder/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ func init() {
})
}

// NewBuilderCommand returns a cobra command for `builder` subcommands
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewBuilderCommand(dockerCLI command.Cli) *cobra.Command {
return newBuilderCommand(dockerCLI)
}

// newBuilderCommand returns a cobra command for `builder` subcommands
func newBuilderCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "builder",
Expand All @@ -40,16 +34,10 @@ func newBuilderCommand(dockerCLI command.Cli) *cobra.Command {
return cmd
}

// NewBakeStubCommand returns a cobra command "stub" for the "bake" subcommand.
// newBakeStubCommand returns a cobra command "stub" for the "bake" subcommand.
// This command is a placeholder / stub that is dynamically replaced by an
// alias for "docker buildx bake" if BuildKit is enabled (and the buildx plugin
// installed).
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewBakeStubCommand(dockerCLI command.Streams) *cobra.Command {
return newBakeStubCommand(dockerCLI)
}

func newBakeStubCommand(dockerCLI command.Streams) *cobra.Command {
return &cobra.Command{
Use: "bake [OPTIONS] [TARGET...]",
Expand Down
8 changes: 1 addition & 7 deletions cli/command/checkpoint/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ func init() {
commands.Register(newCheckpointCommand)
}

// NewCheckpointCommand returns the `checkpoint` subcommand (only in experimental)
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewCheckpointCommand(dockerCLI command.Cli) *cobra.Command {
return newCheckpointCommand(dockerCLI)
}

// newCheckpointCommand returns the `checkpoint` subcommand (only in experimental)
func newCheckpointCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "checkpoint",
Expand Down
8 changes: 1 addition & 7 deletions cli/command/config/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ func init() {
commands.Register(newConfigCommand)
}

// NewConfigCommand returns a cobra command for `config` subcommands
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewConfigCommand(dockerCLI command.Cli) *cobra.Command {
return newConfigCommand(dockerCLI)
}

// newConfigCommand returns a cobra command for `config` subcommands
func newConfigCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "config",
Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@ func inspectContainerAndCheckState(ctx context.Context, apiClient client.APIClie
return &c, nil
}

// NewAttachCommand creates a new cobra.Command for `docker attach`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewAttachCommand(dockerCLI command.Cli) *cobra.Command {
return newAttachCommand(dockerCLI)
}

// newAttachCommand creates a new cobra.Command for `docker attach`
func newAttachCommand(dockerCLI command.Cli) *cobra.Command {
var opts AttachOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ func init() {
commands.RegisterLegacy(newWaitCommand)
}

// NewContainerCommand returns a cobra command for `container` subcommands
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewContainerCommand(dockerCLI command.Cli) *cobra.Command {
return newContainerCommand(dockerCLI)
}

// newContainerCommand returns a cobra command for `container` subcommands
func newContainerCommand(dockerCLI command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "container",
Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ type commitOptions struct {
changes opts.ListOpts
}

// NewCommitCommand creates a new cobra.Command for `docker commit`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewCommitCommand(dockerCLI command.Cli) *cobra.Command {
return newCommitCommand(dockerCLI)
}

// newCommitCommand creates a new cobra.Command for `docker commit`
func newCommitCommand(dockerCLI command.Cli) *cobra.Command {
var options commitOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,7 @@ func copyProgress(ctx context.Context, dst io.Writer, header string, total *int6
return restore, done
}

// NewCopyCommand creates a new `docker cp` command
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewCopyCommand(dockerCLI command.Cli) *cobra.Command {
return newCopyCommand(dockerCLI)
}

// newCopyCommand creates a new `docker cp` command
func newCopyCommand(dockerCLI command.Cli) *cobra.Command {
var opts copyOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ type createOptions struct {
useAPISocket bool
}

// NewCreateCommand creates a new cobra.Command for `docker create`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewCreateCommand(dockerCLI command.Cli) *cobra.Command {
return newCreateCommand(dockerCLI)
}

// newCreateCommand creates a new cobra.Command for `docker create`
func newCreateCommand(dockerCLI command.Cli) *cobra.Command {
var options createOptions
var copts *containerOptions
Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ import (
"github.com/spf13/cobra"
)

// NewDiffCommand creates a new cobra.Command for `docker diff`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewDiffCommand(dockerCLI command.Cli) *cobra.Command {
return newDiffCommand(dockerCLI)
}

// newDiffCommand creates a new cobra.Command for `docker diff`
func newDiffCommand(dockerCLI command.Cli) *cobra.Command {
return &cobra.Command{
Use: "diff CONTAINER",
Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ func NewExecOptions() ExecOptions {
}
}

// NewExecCommand creates a new cobra.Command for `docker exec`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewExecCommand(dockerCLI command.Cli) *cobra.Command {
return newExecCommand(dockerCLI)
}

// newExecCommand creates a new cobra.Command for "docker exec".
func newExecCommand(dockerCLI command.Cli) *cobra.Command {
options := NewExecOptions()

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ type exportOptions struct {
output string
}

// NewExportCommand creates a new `docker export` command
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewExportCommand(dockerCLI command.Cli) *cobra.Command {
return newExportCommand(dockerCLI)
}

// newExportCommand creates a new "docker container export" command.
func newExportCommand(dockerCLI command.Cli) *cobra.Command {
var opts exportOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ type killOptions struct {
containers []string
}

// NewKillCommand creates a new cobra.Command for `docker kill`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewKillCommand(dockerCLI command.Cli) *cobra.Command {
return newKillCommand(dockerCLI)
}

// newKillCommand creates a new cobra.Command for "docker container kill"
func newKillCommand(dockerCLI command.Cli) *cobra.Command {
var opts killOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ type psOptions struct {
filter opts.FilterOpt
}

// NewPsCommand creates a new cobra.Command for `docker ps`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewPsCommand(dockerCLI command.Cli) *cobra.Command {
return newPsCommand(dockerCLI)
}

// newPsCommand creates a new cobra.Command for "docker container ps"
func newPsCommand(dockerCLI command.Cli) *cobra.Command {
options := psOptions{filter: opts.NewFilterOpt()}

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ type logsOptions struct {
container string
}

// NewLogsCommand creates a new cobra.Command for `docker logs`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewLogsCommand(dockerCLI command.Cli) *cobra.Command {
return newLogsCommand(dockerCLI)
}

// newLogsCommand creates a new cobra.Command for "docker container logs"
func newLogsCommand(dockerCLI command.Cli) *cobra.Command {
var opts logsOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ type pauseOptions struct {
containers []string
}

// NewPauseCommand creates a new cobra.Command for `docker pause`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewPauseCommand(dockerCLI command.Cli) *cobra.Command {
return newPauseCommand(dockerCLI)
}

// newPauseCommand creates a new cobra.Command for "docker container pause"
func newPauseCommand(dockerCLI command.Cli) *cobra.Command {
var opts pauseOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ type portOptions struct {
port string
}

// NewPortCommand creates a new cobra.Command for `docker port`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewPortCommand(dockerCli command.Cli) *cobra.Command {
return newPortCommand(dockerCli)
}

// newPortCommand creates a new cobra.Command for "docker container port".
func newPortCommand(dockerCli command.Cli) *cobra.Command {
var opts portOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ type pruneOptions struct {
filter opts.FilterOpt
}

// NewPruneCommand returns a new cobra prune command for containers
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewPruneCommand(dockerCLI command.Cli) *cobra.Command {
return newPruneCommand(dockerCLI)
}

// newPruneCommand returns a new cobra prune command for containers.
func newPruneCommand(dockerCLI command.Cli) *cobra.Command {
options := pruneOptions{filter: opts.NewFilterOpt()}

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/rename.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ type renameOptions struct {
newName string
}

// NewRenameCommand creates a new cobra.Command for `docker rename`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewRenameCommand(dockerCLI command.Cli) *cobra.Command {
return newRenameCommand(dockerCLI)
}

// newRenameCommand creates a new cobra.Command for "docker container rename".
func newRenameCommand(dockerCLI command.Cli) *cobra.Command {
var opts renameOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ type restartOptions struct {
containers []string
}

// NewRestartCommand creates a new cobra.Command for `docker restart`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewRestartCommand(dockerCLI command.Cli) *cobra.Command {
return newRestartCommand(dockerCLI)
}

// newRestartCommand creates a new cobra.Command for "docker container restart".
func newRestartCommand(dockerCLI command.Cli) *cobra.Command {
var opts restartOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ type rmOptions struct {
containers []string
}

// NewRmCommand creates a new cobra.Command for `docker rm`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewRmCommand(dockerCLI command.Cli) *cobra.Command {
return newRmCommand(dockerCLI)
}

// newRmCommand creates a new cobra.Command for "docker container rm".
func newRmCommand(dockerCLI command.Cli) *cobra.Command {
var opts rmOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ type runOptions struct {
detachKeys string
}

// NewRunCommand create a new `docker run` command
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewRunCommand(dockerCLI command.Cli) *cobra.Command {
return newRunCommand(dockerCLI)
}

// newRunCommand create a new "docker run" command.
func newRunCommand(dockerCLI command.Cli) *cobra.Command {
var options runOptions
var copts *containerOptions
Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ type StartOptions struct {
Containers []string
}

// NewStartCommand creates a new cobra.Command for `docker start`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewStartCommand(dockerCli command.Cli) *cobra.Command {
return newStartCommand(dockerCli)
}

// newStartCommand creates a new cobra.Command for "docker container start".
func newStartCommand(dockerCli command.Cli) *cobra.Command {
var opts StartOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,7 @@ type StatsOptions struct {
Filters *filters.Args
}

// NewStatsCommand creates a new [cobra.Command] for "docker stats".
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewStatsCommand(dockerCLI command.Cli) *cobra.Command {
return newStatsCommand(dockerCLI)
}

// newStatsCommand creates a new [cobra.Command] for "docker container stats".
func newStatsCommand(dockerCLI command.Cli) *cobra.Command {
options := StatsOptions{}

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ type stopOptions struct {
containers []string
}

// NewStopCommand creates a new cobra.Command for `docker stop`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewStopCommand(dockerCLI command.Cli) *cobra.Command {
return newStopCommand(dockerCLI)
}

// newStopCommand creates a new cobra.Command for "docker container stop".
func newStopCommand(dockerCLI command.Cli) *cobra.Command {
var opts stopOptions

Expand Down
8 changes: 1 addition & 7 deletions cli/command/container/top.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ type topOptions struct {
args []string
}

// NewTopCommand creates a new cobra.Command for `docker top`
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewTopCommand(dockerCLI command.Cli) *cobra.Command {
return newTopCommand(dockerCLI)
}

// newTopCommand creates a new cobra.Command for "docker container top",
func newTopCommand(dockerCLI command.Cli) *cobra.Command {
var opts topOptions

Expand Down
Loading
Loading