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

Function newSignerAddCommand

cmd/docker-trust/trust/signer_add.go:29–46  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

27}
28
29func newSignerAddCommand(dockerCLI command.Cli) *cobra.Command {
30 var options signerAddOptions
31 cmd := &cobra.Command{
32 Use: "add OPTIONS NAME REPOSITORY [REPOSITORY...] ",
33 Short: "Add a signer",
34 Args: cli.RequiresMinArgs(2),
35 RunE: func(cmd *cobra.Command, args []string) error {
36 options.signer = args[0]
37 options.repos = args[1:]
38 return addSigner(cmd.Context(), dockerCLI, options)
39 },
40 DisableFlagsInUseLine: true,
41 }
42 flags := cmd.Flags()
43 options.keys = opts.NewListOpts(nil)
44 flags.Var(&options.keys, "key", "Path to the signer's public key file")
45 return cmd
46}
47
48var validSignerName = lazyregexp.New(`^[a-z0-9][a-z0-9\_\-]*$`).MatchString
49

Calls 1

addSignerFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…