mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00

Allow builds to be exported into .dockerbuild bundles that can be shared and imported into Docker Desktop. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
34 lines
744 B
Go
34 lines
744 B
Go
package history
|
|
|
|
import (
|
|
"github.com/docker/buildx/util/cobrautil/completion"
|
|
"github.com/docker/cli/cli/command"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
type RootOptions struct {
|
|
Builder *string
|
|
}
|
|
|
|
func RootCmd(rootcmd *cobra.Command, dockerCli command.Cli, opts RootOptions) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "history",
|
|
Short: "Commands to work on build records",
|
|
ValidArgsFunction: completion.Disable,
|
|
RunE: rootcmd.RunE,
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
lsCmd(dockerCli, opts),
|
|
rmCmd(dockerCli, opts),
|
|
logsCmd(dockerCli, opts),
|
|
inspectCmd(dockerCli, opts),
|
|
openCmd(dockerCli, opts),
|
|
traceCmd(dockerCli, opts),
|
|
importCmd(dockerCli, opts),
|
|
exportCmd(dockerCli, opts),
|
|
)
|
|
|
|
return cmd
|
|
}
|