[PR #1543] Docker client version update #5760

Closed
opened 2026-03-01 15:42:30 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/0xJacky/nginx-ui/pull/1543

State: closed
Merged: Yes


Explicitly negotiate Docker API version to ensure compatibility with older Docker daemon versions.

The WithAPIVersionNegotiation() option was enabled, but the manual cli.Ping() call in initClient() did not trigger the client's internal version negotiation mechanism. This resulted in the client attempting to use its default API version (v1.51) for subsequent calls, leading to "404 Not Found" errors when connecting to older Docker daemons. By explicitly calling cli.NegotiateAPIVersionPing(ping) after a successful ping, the client's API version is correctly downgraded to match the daemon's capabilities.


Open in Cursor Open in Web


Note

Low Risk
Small, localized change to Docker client initialization; primary risk is unexpected behavior if Ping negotiation differs across daemon/client versions.

Overview
Ensures the Docker client reliably negotiates a compatible API version with the daemon by capturing the Ping response and calling cli.NegotiateAPIVersionPing(ping) during initClient().

This prevents subsequent Docker API calls from using an incompatible default client API version against older daemons (avoiding 404 Not Found errors).

Written by Cursor Bugbot for commit 562097a532. This will update automatically on new commits. Configure here.

**Original Pull Request:** https://github.com/0xJacky/nginx-ui/pull/1543 **State:** closed **Merged:** Yes --- Explicitly negotiate Docker API version to ensure compatibility with older Docker daemon versions. The `WithAPIVersionNegotiation()` option was enabled, but the manual `cli.Ping()` call in `initClient()` did not trigger the client's internal version negotiation mechanism. This resulted in the client attempting to use its default API version (v1.51) for subsequent calls, leading to "404 Not Found" errors when connecting to older Docker daemons. By explicitly calling `cli.NegotiateAPIVersionPing(ping)` after a successful ping, the client's API version is correctly downgraded to match the daemon's capabilities. --- <p><a href="https://cursor.com/background-agent?bcId=bc-c80ad23f-9cb9-4208-a670-80f594c5a6fb"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-c80ad23f-9cb9-4208-a670-80f594c5a6fb"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a></p> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Small, localized change to Docker client initialization; primary risk is unexpected behavior if `Ping` negotiation differs across daemon/client versions. > > **Overview** > Ensures the Docker client reliably negotiates a compatible API version with the daemon by capturing the `Ping` response and calling `cli.NegotiateAPIVersionPing(ping)` during `initClient()`. > > This prevents subsequent Docker API calls from using an incompatible default client API version against older daemons (avoiding `404 Not Found` errors). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 562097a532c9d13ba53332138bfce705ae09fca0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
kerem 2026-03-01 15:42:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#5760
No description provided.