2018-08-17 05:51:04 -04:00
|
|
|
package builder
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
2019-04-17 18:09:29 -04:00
|
|
|
"github.com/docker/cli/cli/command/image"
|
2018-08-17 05:51:04 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewBuilderCommand returns a cobra command for `builder` subcommands
|
|
|
|
func NewBuilderCommand(dockerCli command.Cli) *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
2019-01-29 19:06:09 -05:00
|
|
|
Use: "builder",
|
|
|
|
Short: "Manage builds",
|
|
|
|
Args: cli.NoArgs,
|
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
|
|
|
Annotations: map[string]string{"version": "1.31"},
|
2018-08-17 05:51:04 -04:00
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
NewPruneCommand(dockerCli),
|
2019-04-17 18:09:29 -04:00
|
|
|
image.NewBuildCommand(dockerCli),
|
2018-08-17 05:51:04 -04:00
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|