newManifestCommand returns a cobra command for `manifest` subcommands
(dockerCLI command.Cli)
| 16 | |
| 17 | // newManifestCommand returns a cobra command for `manifest` subcommands |
| 18 | func newManifestCommand(dockerCLI command.Cli) *cobra.Command { |
| 19 | // use dockerCli as command.Cli |
| 20 | cmd := &cobra.Command{ |
| 21 | Use: "manifest COMMAND", |
| 22 | Short: "Manage Docker image manifests and manifest lists", |
| 23 | Long: manifestDescription, |
| 24 | Args: cli.NoArgs, |
| 25 | Run: func(cmd *cobra.Command, args []string) { |
| 26 | _, _ = fmt.Fprint(dockerCLI.Err(), "\n"+cmd.UsageString()) |
| 27 | }, |
| 28 | Annotations: map[string]string{"experimentalCLI": ""}, |
| 29 | DisableFlagsInUseLine: true, |
| 30 | } |
| 31 | cmd.AddCommand( |
| 32 | newCreateListCommand(dockerCLI), |
| 33 | newInspectCommand(dockerCLI), |
| 34 | newAnnotateCommand(dockerCLI), |
| 35 | newPushListCommand(dockerCLI), |
| 36 | newRmManifestListCommand(dockerCLI), |
| 37 | ) |
| 38 | return cmd |
| 39 | } |
| 40 | |
| 41 | var manifestDescription = ` |
| 42 | The **docker manifest** command has subcommands for managing image manifests and |
nothing calls this directly
no test coverage detected
searching dependent graphs…