build: basis of build command

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2019-03-23 21:30:29 -07:00
parent 8b7c38e61a
commit 4b0c0468d0
10 changed files with 620 additions and 88 deletions

21
commands/root.go Normal file
View File

@ -0,0 +1,21 @@
package commands
import (
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
func NewRootCmd(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Short: "Build with BuildKit",
Use: "buildx",
}
addCommands(cmd, dockerCli)
return cmd
}
func addCommands(cmd *cobra.Command, dockerCli command.Cli) {
cmd.AddCommand(
buildCmd(dockerCli),
)
}