move the `trust` subcommands to a plugin, so that the subcommands can
be installed separate from the `docker trust` integration in push/pull
(for situations where trust verification happens on the daemon side).
make binary
go build -o /usr/libexec/docker/cli-plugins/docker-trust ./cmd/docker-trust
docker info
Client:
Version: 28.2.0-dev
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.24.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
trust: Manage trust on Docker images (Docker Inc.)
Version: unknown-version
Path: /usr/libexec/docker/cli-plugins/docker-trust
docker trust --help
Usage: docker trust [OPTIONS] COMMAND
Extended build capabilities with BuildKit
Options:
-D, --debug Enable debug logging
Management Commands:
key Manage keys for signing Docker images
signer Manage entities who can sign Docker images
Commands:
inspect Return low-level information about keys and signatures
revoke Remove trust for an image
sign Sign an image
Run 'docker trust COMMAND --help' for more information on a command.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
31 lines
1.0 KiB
Go
31 lines
1.0 KiB
Go
package commands
|
|
|
|
import (
|
|
"github.com/docker/cli/cli/command"
|
|
_ "github.com/docker/cli/cli/command/builder"
|
|
_ "github.com/docker/cli/cli/command/checkpoint"
|
|
_ "github.com/docker/cli/cli/command/config"
|
|
_ "github.com/docker/cli/cli/command/container"
|
|
_ "github.com/docker/cli/cli/command/context"
|
|
_ "github.com/docker/cli/cli/command/image"
|
|
_ "github.com/docker/cli/cli/command/manifest"
|
|
_ "github.com/docker/cli/cli/command/network"
|
|
_ "github.com/docker/cli/cli/command/node"
|
|
_ "github.com/docker/cli/cli/command/plugin"
|
|
_ "github.com/docker/cli/cli/command/registry"
|
|
_ "github.com/docker/cli/cli/command/secret"
|
|
_ "github.com/docker/cli/cli/command/service"
|
|
_ "github.com/docker/cli/cli/command/stack"
|
|
_ "github.com/docker/cli/cli/command/swarm"
|
|
_ "github.com/docker/cli/cli/command/system"
|
|
_ "github.com/docker/cli/cli/command/volume"
|
|
"github.com/docker/cli/internal/commands"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func AddCommands(cmd *cobra.Command, dockerCLI command.Cli) {
|
|
for _, c := range commands.Commands() {
|
|
cmd.AddCommand(c(dockerCLI))
|
|
}
|
|
}
|