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

Function newSignerRemoveCommand

cmd/docker-trust/trust/signer_remove.go:24–40  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

22}
23
24func newSignerRemoveCommand(dockerCLI command.Cli) *cobra.Command {
25 options := signerRemoveOptions{}
26 cmd := &cobra.Command{
27 Use: "remove [OPTIONS] NAME REPOSITORY [REPOSITORY...]",
28 Short: "Remove a signer",
29 Args: cli.RequiresMinArgs(2),
30 RunE: func(cmd *cobra.Command, args []string) error {
31 options.signer = args[0]
32 options.repos = args[1:]
33 return removeSigner(cmd.Context(), dockerCLI, options)
34 },
35 DisableFlagsInUseLine: true,
36 }
37 flags := cmd.Flags()
38 flags.BoolVarP(&options.forceYes, "force", "f", false, "Do not prompt for confirmation before removing the most recent signer")
39 return cmd
40}
41
42func removeSigner(ctx context.Context, dockerCLI command.Cli, options signerRemoveOptions) error {
43 var errRepos []string

Callers 2

newTrustSignerCommandFunction · 0.85

Calls 1

removeSignerFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…