(dockerCLI command.Cli)
| 17 | } |
| 18 | |
| 19 | func newCreateListCommand(dockerCLI command.Cli) *cobra.Command { |
| 20 | opts := createOpts{} |
| 21 | |
| 22 | cmd := &cobra.Command{ |
| 23 | Use: "create MANIFEST_LIST MANIFEST [MANIFEST...]", |
| 24 | Short: "Create a local manifest list for annotating and pushing to a registry", |
| 25 | Args: cli.RequiresMinArgs(2), |
| 26 | RunE: func(cmd *cobra.Command, args []string) error { |
| 27 | return createManifestList(cmd.Context(), dockerCLI, args, opts) |
| 28 | }, |
| 29 | DisableFlagsInUseLine: true, |
| 30 | } |
| 31 | |
| 32 | flags := cmd.Flags() |
| 33 | flags.BoolVar(&opts.insecure, "insecure", false, "Allow communication with an insecure registry") |
| 34 | flags.BoolVarP(&opts.amend, "amend", "a", false, "Amend an existing manifest list") |
| 35 | return cmd |
| 36 | } |
| 37 | |
| 38 | func createManifestList(ctx context.Context, dockerCLI command.Cli, args []string, opts createOpts) error { |
| 39 | newRef := args[0] |
searching dependent graphs…