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

Function newRevokeCommand

cmd/docker-trust/trust/revoke.go:21–35  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

19}
20
21func newRevokeCommand(dockerCLI command.Cli) *cobra.Command {
22 options := revokeOptions{}
23 cmd := &cobra.Command{
24 Use: "revoke [OPTIONS] IMAGE[:TAG]",
25 Short: "Remove trust for an image",
26 Args: cli.ExactArgs(1),
27 RunE: func(cmd *cobra.Command, args []string) error {
28 return revokeTrust(cmd.Context(), dockerCLI, args[0], options)
29 },
30 DisableFlagsInUseLine: true,
31 }
32 flags := cmd.Flags()
33 flags.BoolVarP(&options.forceYes, "yes", "y", false, "Do not prompt for confirmation")
34 return cmd
35}
36
37func revokeTrust(ctx context.Context, dockerCLI command.Cli, remote string, options revokeOptions) error {
38 imgRefAndAuth, err := trust.GetImageReferencesAndAuth(ctx, authResolver(dockerCLI), remote)

Callers 5

NewRootCmdFunction · 0.85
newTrustCommandFunction · 0.85
TestTrustRevokeCommandFunction · 0.85

Calls 1

revokeTrustFunction · 0.85

Tested by 3

TestTrustRevokeCommandFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…