diff --git a/cli/command/image/push.go b/cli/command/image/push.go index cd79ff9289..1ef31aedd7 100644 --- a/cli/command/image/push.go +++ b/cli/command/image/push.go @@ -57,7 +57,7 @@ func NewPushCommand(dockerCli command.Cli) *cobra.Command { flags := cmd.Flags() flags.BoolVarP(&opts.all, "all-tags", "a", false, "Push all tags of an image to the repository") flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Suppress verbose output") - command.AddTrustSigningFlags(flags, &opts.untrusted, dockerCli.ContentTrustEnabled()) + flags.BoolVar(&opts.untrusted, "disable-content-trust", !dockerCli.ContentTrustEnabled(), "Skip image signing") // Don't default to DOCKER_DEFAULT_PLATFORM env variable, always default to // pushing the image as-is. This also avoids forcing the platform selection diff --git a/cli/command/trust.go b/cli/command/trust.go index 65f2408585..c802a14e1f 100644 --- a/cli/command/trust.go +++ b/cli/command/trust.go @@ -8,8 +8,3 @@ import ( func AddTrustVerificationFlags(fs *pflag.FlagSet, v *bool, trusted bool) { fs.BoolVar(v, "disable-content-trust", !trusted, "Skip image verification") } - -// AddTrustSigningFlags adds "signing" flags to the provided flagset -func AddTrustSigningFlags(fs *pflag.FlagSet, v *bool, trusted bool) { - fs.BoolVar(v, "disable-content-trust", !trusted, "Skip image signing") -}