From 1ace9aec347807c708ea9554a7bb867c00191c2e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 25 Sep 2025 10:24:03 +0200 Subject: [PATCH] cli/command: don't use DCT status for trust stub-flags This is a follow-up to 7609dde8d0ab23b25be29adc9eb6069f4edb5e80 and 3f5b1bdd3240d390f48290c75dd724788eddfb6f, which removed support for DCT for build and plugin commands. As these flags are just stubs, hidden by default and no longer functional, they don't have to reflect the current state of DCT. Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build.go | 2 +- cli/command/plugin/install.go | 2 +- cli/command/plugin/push.go | 2 +- cli/command/plugin/upgrade.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/command/image/build.go b/cli/command/image/build.go index d98b21f493..e53342ddf8 100644 --- a/cli/command/image/build.go +++ b/cli/command/image/build.go @@ -147,7 +147,7 @@ func newBuildCommand(dockerCLI command.Cli) *cobra.Command { flags.SetAnnotation("target", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#target"}) flags.StringVar(&options.imageIDFile, "iidfile", "", "Write the image ID to the file") - flags.Bool("disable-content-trust", dockerCLI.ContentTrustEnabled(), "Skip image verification (deprecated)") + flags.Bool("disable-content-trust", true, "Skip image verification (deprecated)") _ = flags.MarkHidden("disable-content-trust") flags.StringVar(&options.platform, "platform", os.Getenv("DOCKER_DEFAULT_PLATFORM"), "Set platform if server is multi-platform capable") diff --git a/cli/command/plugin/install.go b/cli/command/plugin/install.go index 926074e933..652ac8deb7 100644 --- a/cli/command/plugin/install.go +++ b/cli/command/plugin/install.go @@ -44,7 +44,7 @@ func newInstallCommand(dockerCLI command.Cli) *cobra.Command { flags.BoolVar(&options.grantPerms, "grant-all-permissions", false, "Grant all permissions necessary to run the plugin") flags.BoolVar(&options.disable, "disable", false, "Do not enable the plugin on install") flags.StringVar(&options.localName, "alias", "", "Local name for plugin") - flags.Bool("disable-content-trust", dockerCLI.ContentTrustEnabled(), "Skip image verification (deprecated)") + flags.Bool("disable-content-trust", true, "Skip image verification (deprecated)") _ = flags.MarkHidden("disable-content-trust") return cmd } diff --git a/cli/command/plugin/push.go b/cli/command/plugin/push.go index 5f1349a900..fc7c5a4980 100644 --- a/cli/command/plugin/push.go +++ b/cli/command/plugin/push.go @@ -25,7 +25,7 @@ func newPushCommand(dockerCLI command.Cli) *cobra.Command { } flags := cmd.Flags() - flags.Bool("disable-content-trust", dockerCLI.ContentTrustEnabled(), "Skip image verification (deprecated)") + flags.Bool("disable-content-trust", true, "Skip image verification (deprecated)") _ = flags.MarkHidden("disable-content-trust") return cmd } diff --git a/cli/command/plugin/upgrade.go b/cli/command/plugin/upgrade.go index 2024dfb4f9..eb7bbccda7 100644 --- a/cli/command/plugin/upgrade.go +++ b/cli/command/plugin/upgrade.go @@ -33,7 +33,7 @@ func newUpgradeCommand(dockerCLI command.Cli) *cobra.Command { flags := cmd.Flags() flags.BoolVar(&options.grantPerms, "grant-all-permissions", false, "Grant all permissions necessary to run the plugin") - flags.Bool("disable-content-trust", dockerCLI.ContentTrustEnabled(), "Skip image verification (deprecated)") + flags.Bool("disable-content-trust", true, "Skip image verification (deprecated)") _ = flags.MarkHidden("disable-content-trust") flags.BoolVar(&options.skipRemoteCheck, "skip-remote-check", false, "Do not check if specified remote plugin matches existing plugin image") return cmd