[PR #1543] [MERGED] Docker client version update #1329

Closed
opened 2026-02-26 12:11:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/0xJacky/nginx-ui/pull/1543
Author: @0xJacky
Created: 2/6/2026
Status: Merged
Merged: 2/6/2026
Merged by: @0xJacky

Base: devHead: cursor/docker-client-version-update-d1b4


📝 Commits (1)

  • 562097a fix(docker): explicitly negotiate API version to ensure compatibility

📊 Changes

1 file changed (+5 additions, -2 deletions)

View changed files

📝 internal/docker/docker.go (+5 -2)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/0xJacky/nginx-ui/pull/1543 **Author:** [@0xJacky](https://github.com/0xJacky) **Created:** 2/6/2026 **Status:** ✅ Merged **Merged:** 2/6/2026 **Merged by:** [@0xJacky](https://github.com/0xJacky) **Base:** `dev` ← **Head:** `cursor/docker-client-version-update-d1b4` --- ### 📝 Commits (1) - [`562097a`](https://github.com/0xJacky/nginx-ui/commit/562097a532c9d13ba53332138bfce705ae09fca0) fix(docker): explicitly negotiate API version to ensure compatibility ### 📊 Changes **1 file changed** (+5 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `internal/docker/docker.go` (+5 -2) </details> ### 📄 Description 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 --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 12:11:13 +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#1329
No description provided.