Merge pull request #1067 from jedevc/fix-imagetools-builder

imagetools: respect --builder flag
pull/1071/head
Tõnis Tiigi 3 years ago committed by GitHub
commit 951201ac1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -255,7 +255,7 @@ func createCmd(dockerCli command.Cli, opts RootOptions) *cobra.Command {
Use: "create [OPTIONS] [SOURCE] [SOURCE...]",
Short: "Create a new image based on source images",
RunE: func(cmd *cobra.Command, args []string) error {
options.builder = opts.Builder
options.builder = *opts.Builder
return runCreate(dockerCli, options, args)
},
}

@ -66,7 +66,7 @@ func inspectCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command {
Short: "Show details of an image in the registry",
Args: cli.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
options.builder = rootOpts.Builder
options.builder = *rootOpts.Builder
return runInspect(dockerCli, options, args[0])
},
}

@ -6,7 +6,7 @@ import (
)
type RootOptions struct {
Builder string
Builder *string
}
func RootCmd(dockerCli command.Cli, opts RootOptions) *cobra.Command {

@ -74,7 +74,7 @@ func addCommands(cmd *cobra.Command, dockerCli command.Cli) {
versionCmd(dockerCli),
pruneCmd(dockerCli, opts),
duCmd(dockerCli, opts),
imagetoolscmd.RootCmd(dockerCli, imagetoolscmd.RootOptions{Builder: opts.builder}),
imagetoolscmd.RootCmd(dockerCli, imagetoolscmd.RootOptions{Builder: &opts.builder}),
)
}

Loading…
Cancel
Save