MCPcopy Create free account
hub / github.com/docker/cli / newInspectCommand

Function newInspectCommand

cmd/docker-trust/trust/inspect.go:26–44  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

24}
25
26func 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
46func runInspect(ctx context.Context, dockerCLI command.Cli, opts inspectOptions) error {
47 if opts.prettyPrint {

Calls 1

runInspectFunction · 0.70

Used in the wild real call sites across dependent graphs

searching dependent graphs…