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

Function newPushListCommand

cli/command/manifest/push.go:45–63  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

43}
44
45func newPushListCommand(dockerCLI command.Cli) *cobra.Command {
46 opts := pushOpts{}
47
48 cmd := &cobra.Command{
49 Use: "push [OPTIONS] MANIFEST_LIST",
50 Short: "Push a manifest list to a repository",
51 Args: cli.ExactArgs(1),
52 RunE: func(cmd *cobra.Command, args []string) error {
53 opts.target = args[0]
54 return runPush(cmd.Context(), dockerCLI, opts)
55 },
56 DisableFlagsInUseLine: true,
57 }
58
59 flags := cmd.Flags()
60 flags.BoolVarP(&opts.purge, "purge", "p", false, "Remove the local manifest list after push")
61 flags.BoolVar(&opts.insecure, "insecure", false, "Allow push to an insecure registry")
62 return cmd
63}
64
65func runPush(ctx context.Context, dockerCli command.Cli, opts pushOpts) error {
66 targetRef, err := normalizeReference(opts.target)

Callers 3

TestManifestPushErrorsFunction · 0.85
TestManifestPushFunction · 0.85
newManifestCommandFunction · 0.85

Calls 1

runPushFunction · 0.70

Tested by 2

TestManifestPushErrorsFunction · 0.68
TestManifestPushFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…