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

Function newCreateListCommand

cli/command/manifest/create_list.go:19–36  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

17}
18
19func 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
38func createManifestList(ctx context.Context, dockerCLI command.Cli, args []string, opts createOpts) error {
39 newRef := args[0]

Callers 5

TestManifestCreateErrorsFunction · 0.85
TestManifestCreateAmendFunction · 0.85
newManifestCommandFunction · 0.85

Calls 1

createManifestListFunction · 0.85

Tested by 4

TestManifestCreateErrorsFunction · 0.68
TestManifestCreateAmendFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…