Skip to content

Conversation

@thaJeztah
Copy link
Member

relates to:

Currently, the plugin.Run command constructs the DockerCli using the default options, assuming plugins run with all the same options as the CLI itself; to customize the CLI there's a "Apply" option, but this means mutating the CLI after it's already constructed, which is not ideal.

This patch adds a variadic ops argument to allow CLI plugins to pass custom options to use for the CLI, so that there's no need to mutate its config in most cases.

- Human readable description for the release notes

Go SDK: cli-plugins/plugin: Run: allow customizing the CLI

- A picture of a cute animal (not mandatory but encouraged)

Currently, the plugin.Run command constructs the DockerCli using
the default options, assuming plugins run with all the same options
as the CLI itself; to customize the CLI there's a "Apply" option,
but this means mutating the CLI after it's already constructed, which
is not ideal.

This patch adds a variadic ops argument to allow CLI plugins to pass
custom options to use for the CLI, so that there's no need to mutate
its config in most cases.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 2711800)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 28.4.1 milestone Sep 24, 2025
@thaJeztah thaJeztah added impact/changelog kind/enhancement status/2-code-review area/plugins area/go-sdk Changes affecting the Go SDK impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Sep 24, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli-plugins/plugin/plugin.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@vvoland vvoland merged commit e1dd0e1 into docker:28.x Sep 24, 2025
110 of 114 checks passed
@thaJeztah thaJeztah deleted the 28.x_backport_cli_plugin_options branch September 24, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdk Changes affecting the Go SDK area/plugins impact/changelog impact/go-sdk Noteworthy (compatibility changes) in the Go SDK kind/enhancement status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants