Skip to content

Commit f31059b

Browse files
committed
implement docker trust as plugin
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 <[email protected]>
1 parent 7414d73 commit f31059b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+386
-60
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ dynbinary: ## build dynamically linked binary
6969
plugins: ## build example CLI plugins
7070
scripts/build/plugins
7171

72+
.PHONY: trust-plugin
73+
trust-plugin: ## build docker-trust CLI plugins
74+
scripts/build/trust-plugin
75+
76+
.PHONY: install-trust-plugin
77+
install-trust-plugin: trust-plugin
78+
install-trust-plugin: ## install docker-trust CLI plugins
79+
install -D -m 0755 "$$(readlink -f build/docker-trust)" /usr/libexec/docker/cli-plugins/docker-trust
80+
7281
.PHONY: vendor
7382
vendor: ## update vendor with go modules
7483
rm -rf vendor

cli/command/commands/commands.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
_ "github.com/docker/cli/cli/command/stack"
1919
_ "github.com/docker/cli/cli/command/swarm"
2020
_ "github.com/docker/cli/cli/command/system"
21-
_ "github.com/docker/cli/cli/command/trust"
2221
_ "github.com/docker/cli/cli/command/volume"
2322
"github.com/docker/cli/internal/commands"
2423
"github.com/spf13/cobra"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)