(dockerCLI command.Cli)
| 24 | } |
| 25 | |
| 26 | func newInspectCommand(dockerCLI command.Cli) *cobra.Command { |
| 27 | options := inspectOptions{} |
| 28 | cmd := &cobra.Command{ |
| 29 | Use: "inspect IMAGE[:TAG] [IMAGE[:TAG]...]", |
| 30 | Short: "Return low-level information about keys and signatures", |
| 31 | Args: cli.RequiresMinArgs(1), |
| 32 | RunE: func(cmd *cobra.Command, args []string) error { |
| 33 | options.remotes = args |
| 34 | |
| 35 | return runInspect(cmd.Context(), dockerCLI, options) |
| 36 | }, |
| 37 | DisableFlagsInUseLine: true, |
| 38 | } |
| 39 | |
| 40 | flags := cmd.Flags() |
| 41 | flags.BoolVar(&options.prettyPrint, "pretty", false, "Print the information in a human friendly format") |
| 42 | |
| 43 | return cmd |
| 44 | } |
| 45 | |
| 46 | func runInspect(ctx context.Context, dockerCLI command.Cli, opts inspectOptions) error { |
| 47 | if opts.prettyPrint { |
searching dependent graphs…