Title: Automatically negotiate API version to use · Issue #2547 · docker-java/docker-java · GitHub
Open Graph Title: Automatically negotiate API version to use · Issue #2547 · docker-java/docker-java
X Title: Automatically negotiate API version to use · Issue #2547 · docker-java/docker-java
Description: The go client has an option to automatically negotiate what API version should be selected. This could also be used here. Fork example calling `/version` returns the following: { "Platform" : { "Name" : "Docker Desktop 4.51.0 (210443)" }...
Open Graph Description: The go client has an option to automatically negotiate what API version should be selected. This could also be used here. Fork example calling `/version` returns the following: { "Platform" : { "Na...
X Description: The go client has an option to automatically negotiate what API version should be selected. This could also be used here. Fork example calling `/version` returns the following: { "Platform&quo...
Opengraph URL: https://github.com/docker-java/docker-java/issues/2547
X: @github
Domain: github-redirect.dependabot.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Automatically negotiate API version to use","articleBody":"The [go client has an option to automatically negotiate what API version should be selected](https://github.com/moby/moby/blob/6e52828ec38b2f53f695b97ffb0b4ba94fa255e4/client/client.go#L312-L351).\n\nThis could also be used here.\n\n\u003cdetails\u003e\u003csummary\u003eFork example calling `/version` returns the following:\u003c/summary\u003e\n\n```\n{\n \"Platform\" : {\n \"Name\" : \"Docker Desktop 4.51.0 (210443)\"\n },\n \"Components\" : [ {\n \"Name\" : \"Engine\",\n \"Version\" : \"28.5.2\",\n \"Details\" : {\n \"ApiVersion\" : \"1.51\",\n \"Arch\" : \"amd64\",\n \"BuildTime\" : \"2025-11-05T14:43:25.000000000+00:00\",\n \"Experimental\" : \"false\",\n \"GitCommit\" : \"89c5e8f\",\n \"GoVersion\" : \"go1.25.3\",\n \"KernelVersion\" : \"6.6.87.2-microsoft-standard-WSL2\",\n \"MinAPIVersion\" : \"1.24\",\n \"Os\" : \"linux\"\n }\n }, {\n \"Name\" : \"containerd\",\n \"Version\" : \"v1.7.29\",\n \"Details\" : {\n \"GitCommit\" : \"442cb34bda9a6a0fed82a2ca7cade05c5c749582\"\n }\n }, {\n \"Name\" : \"runc\",\n \"Version\" : \"1.3.3\",\n \"Details\" : {\n \"GitCommit\" : \"v1.3.3-0-gd842d771\"\n }\n }, {\n \"Name\" : \"docker-init\",\n \"Version\" : \"0.19.0\",\n \"Details\" : {\n \"GitCommit\" : \"de40ad0\"\n }\n } ],\n \"Version\" : \"28.5.2\",\n \"ApiVersion\" : \"1.51\",\n \"MinAPIVersion\" : \"1.24\",\n \"GitCommit\" : \"89c5e8f\",\n \"GoVersion\" : \"go1.25.3\",\n \"Os\" : \"linux\",\n \"Arch\" : \"amd64\",\n \"KernelVersion\" : \"6.6.87.2-microsoft-standard-WSL2\",\n \"BuildTime\" : \"2025-11-05T14:43:25.000000000+00:00\"\n}\n```\n\n```\n{\n \"Platform\" : {\n \"Name\" : \"Docker Desktop 4.52.0 (210994)\"\n },\n \"Components\" : [ {\n \"Name\" : \"Engine\",\n \"Version\" : \"29.0.1\",\n \"Details\" : {\n \"ApiVersion\" : \"1.52\",\n \"Arch\" : \"amd64\",\n \"BuildTime\" : \"2025-11-14T16:17:57.000000000+00:00\",\n \"Experimental\" : \"false\",\n \"GitCommit\" : \"198b5e3\",\n \"GoVersion\" : \"go1.25.4\",\n \"KernelVersion\" : \"6.6.87.2-microsoft-standard-WSL2\",\n \"MinAPIVersion\" : \"1.44\",\n \"Os\" : \"linux\"\n }\n }, {\n \"Name\" : \"containerd\",\n \"Version\" : \"v2.1.5\",\n \"Details\" : {\n \"GitCommit\" : \"fcd43222d6b07379a4be9786bda52438f0dd16a1\"\n }\n }, {\n \"Name\" : \"runc\",\n \"Version\" : \"1.3.3\",\n \"Details\" : {\n \"GitCommit\" : \"v1.3.3-0-gd842d771\"\n }\n }, {\n \"Name\" : \"docker-init\",\n \"Version\" : \"0.19.0\",\n \"Details\" : {\n \"GitCommit\" : \"de40ad0\"\n }\n } ],\n \"Version\" : \"29.0.1\",\n \"ApiVersion\" : \"1.52\",\n \"MinAPIVersion\" : \"1.44\",\n \"GitCommit\" : \"198b5e3\",\n \"GoVersion\" : \"go1.25.4\",\n \"Os\" : \"linux\",\n \"Arch\" : \"amd64\",\n \"KernelVersion\" : \"6.6.87.2-microsoft-standard-WSL2\",\n \"BuildTime\" : \"2025-11-14T16:17:57.000000000+00:00\"\n}\n```\n\u003c/details\u003e\n\nThe `MinAPIVersion` attribute could be used to compare it with the client's version.\nIf `ClientAPIVersion` \u003c `MinAPIVersion` the client could log an warning and force the use of `MinAPIVersion` - this should prevent hard errors at the cost that the API might be incompatible and not work 100%.\n\nThe same can also be done the other way around if `ClientAPIVersion` \u003e `ApiVersion`.\n\nNOTE: It's currently possible to just omit the ``/\u003cversion\u003e`` prefix from the paths.\nHowever [using the API without a version-prefix is deprecated and will be removed in a future release](https://docs.docker.com/reference/api/engine/version/v1.52/#section/Versioning).","author":{"url":"https://github.com/AB-xdev","@type":"Person","name":"AB-xdev"},"datePublished":"2025-11-24T09:17:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2547/docker-java/issues/2547"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e2a433e1-1522-0072-88d9-52322356e7e4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8540:512E3:77FAC0C:A8D9AFD:6A5042C4 |
| html-safe-nonce | a660c683d6ad6abde523e2f2fc54e5154238f746b1270601686494f888e55f90 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTQwOjUxMkUzOjc3RkFDMEM6QThEOUFGRDo2QTUwNDJDNCIsInZpc2l0b3JfaWQiOiI3Mzg0ODQ4MTM4NjgxNDY3NTg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a4545cf23423750b4b447ab3703dc21c3895198c3eabb7cccb7596311a7637bc |
| hovercard-subject-tag | issue:3657895084 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/docker-java/docker-java/2547/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cfc1e1f0fd3c1352315b968451df5367b1772e2389e4e3d8ddcd138cc2c0d4c4/docker-java/docker-java/issues/2547 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cfc1e1f0fd3c1352315b968451df5367b1772e2389e4e3d8ddcd138cc2c0d4c4/docker-java/docker-java/issues/2547 |
| og:image:alt | The go client has an option to automatically negotiate what API version should be selected. This could also be used here. Fork example calling `/version` returns the following: { "Platform" : { "Na... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AB-xdev |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/docker-java/docker-java git https://github.com/docker-java/docker-java.git |
| octolytics-dimension-user_id | 7772003 |
| octolytics-dimension-user_login | docker-java |
| octolytics-dimension-repository_id | 20415251 |
| octolytics-dimension-repository_nwo | docker-java/docker-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20415251 |
| octolytics-dimension-repository_network_root_nwo | docker-java/docker-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d90666eaf032b7eb8975a378efe38e37f4ebb96c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width