cli/command/image: un-export RunPush

This function was exported in e43c7920ea950b0c8f2004bce114e71f7f993854
for use of "docker app", which is now deprecated. The signature of this
function also depended on a non-exported type so it could not be used
externally.

Make it internal again, as it was never designed to be exported. There
are no known external consumers of this function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-03-31 19:19:23 +02:00
parent 2b84421520
commit 9b2479dca7
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -45,7 +45,7 @@ func NewPushCommand(dockerCli command.Cli) *cobra.Command {
Args: cli.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
opts.remote = args[0]
return RunPush(cmd.Context(), dockerCli, opts)
return runPush(cmd.Context(), dockerCli, opts)
},
Annotations: map[string]string{
"category-top": "6",
@ -73,8 +73,8 @@ Image index won't be pushed, meaning that other manifests, including attestation
return cmd
}
// RunPush performs a push against the engine based on the specified options
func RunPush(ctx context.Context, dockerCli command.Cli, opts pushOptions) error {
// runPush performs a push against the engine based on the specified options.
func runPush(ctx context.Context, dockerCli command.Cli, opts pushOptions) error {
var platform *ocispec.Platform
out := tui.NewOutput(dockerCli.Out())
if opts.platform != "" {