- Notifications
You must be signed in to change notification settings - Fork18.9k
Comments
client: add support for overriding minimum API version#52046
Open
thaJeztah wants to merge 1 commit intomoby:masterfrom
Open
client: add support for overriding minimum API version#52046thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah wants to merge 1 commit intomoby:masterfrom
Conversation
92ecf5d to24b69e7Compare Comment on lines +153 to +157
| // We allow downgrading the client's minimum version to an unsupported lower version. | ||
| doc: "downgrade minimum version", | ||
| version: "1.0", | ||
| expected: "1.0", | ||
| }, |
MemberAuthor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
FWIW; we could apply the same limits as are used for the daemon; the daemon also acceptsDOCKER_MIN_API_VERSION as an env-var, but constraints it to1.24 as that was what we already dropped support for (see#51186 and#46887);
Lines 63 to 69 in1f71f22
| // defaultMinAPIVersion is the minimum API version supported by the API. | |
| // This version can be overridden through the "DOCKER_MIN_API_VERSION" | |
| // environment variable. The minimum allowed version is determined | |
| // by [MinAPIVersion]. | |
| defaultMinAPIVersion="1.44" | |
| // MinAPIVersion is the minimum API version supported by the daemon. | |
| MinAPIVersion="1.24" |
This adds options to override the minimum API version consideredwhen performing API-version negotiation. These options allow theclient to either downgrade to versions lower than supported (lowerthan MinAPIVersion), which may result in degraded functionality,or to raise the minimum version to exclude older API versions.The `WithMinAPIVersion` can be used to set the version programmatically.The `WithMinAPIVersionFromEnv` allows a user to set the minimum APIversion at runtime through the `DOCKER_MIN_API_VERSION` env-var.The `WithMinAPIVersionFromEnv` is more permissive to account forslightly malformed valus in the environment variables; it acceptswhitespace, and API versions with a "v" prefix. It also ignoresempty values in the environment-variable (which are considered ano-op).Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
24b69e7 to4d9a33aCompareMemberAuthor
thaJeztah commentedFeb 17, 2026
On oracle (VM, rootless); Windows (graphdriver, builtin); Windows (graphdriver, containerd); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
area/apiAPI impact/changelogimpact/go-sdkNoteworthy (compatibility changes) in the Go SDK kind/enhancementEnhancements are not bugs or new features but can improve usability or performance. module/clientstatus/2-code-review
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.41: driver not connectingdocker/buildx#3654This adds options to override the minimum API version considered when performing API-version negotiation. These options allow the client to either downgrade to versions lower than supported (lower than MinAPIVersion), which may result in degraded functionality, or to raise the minimum version to exclude older API versions.
The
WithMinAPIVersioncan be used to set the version programmatically. TheWithMinAPIVersionFromEnvallows a user to set the minimum API version at runtime through theDOCKER_MIN_API_VERSIONenv-var.The
WithMinAPIVersionFromEnvis more permissive to account for slightly malformed valus in the environment variables; it accepts whitespace, and API versions with a "v" prefix. It also ignores empty values in the environment-variable (which are considered a no-op).- What I did
- How I did it
- How to verify it
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)