(dockerCli command.Cli, opts inspectOptions)
| 45 | } |
| 46 | |
| 47 | func runInspect(dockerCli command.Cli, opts inspectOptions) error { |
| 48 | getRefFunc := func(ref string) (any, []byte, error) { |
| 49 | c, err := dockerCli.ContextStore().GetMetadata(ref) |
| 50 | if err != nil { |
| 51 | return nil, nil, err |
| 52 | } |
| 53 | tlsListing, err := dockerCli.ContextStore().ListTLSFiles(ref) |
| 54 | if err != nil { |
| 55 | return nil, nil, err |
| 56 | } |
| 57 | return contextWithTLSListing{ |
| 58 | Metadata: c, |
| 59 | TLSMaterial: tlsListing, |
| 60 | Storage: dockerCli.ContextStore().GetStorageInfo(ref), |
| 61 | }, nil, nil |
| 62 | } |
| 63 | return inspect.Inspect(dockerCli.Out(), opts.refs, opts.format, getRefFunc) |
| 64 | } |
| 65 | |
| 66 | type contextWithTLSListing struct { |
| 67 | store.Metadata |
searching dependent graphs…