Upgrade Docker SDK to v27.5.1 to support Docker API 1.44+#119
Merged
Upgrade Docker SDK to v27.5.1 to support Docker API 1.44+#119
Conversation
This upgrade fixes compatibility issues with modern Docker daemons (Docker 25.x+) which require minimum API version 1.44. The previous SDK v24.0.9 only supported up to API 1.43. Changes: - Updated github.com/docker/docker from v24.0.9 to v27.5.1 - Migrated Docker SDK type references to new subpackages: * types.ImagePullOptions → image.PullOptions * types.ContainerRemoveOptions → container.RemoveOptions * types.ContainerStartOptions → container.StartOptions * types.ContainerLogsOptions → container.LogsOptions * types.CopyToContainerOptions → container.CopyToContainerOptions - Updated imports across implementation, test, and fake files - Added required OpenTelemetry dependencies The SDK now supports API versions 1.24-1.47+ with automatic version negotiation, ensuring compatibility with Docker versions from 1.12 through 28.x.
…ecated types to new subpackages
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 free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Problem
The previous Docker SDK v24.0.9 only supported API versions up to 1.43, causing runtime errors when connecting to Docker 25+ daemons:
Solution
This upgrade brings support for Docker API versions 1.24 through 1.47+, with the SDK automatically negotiating the highest compatible version with the daemon.
Changes Made
Commit 1: Upgrade Docker SDK to v27.5.1
github.com/docker/dockerfrom v24.0.9 to v27.5.1types.ImagePullOptions→image.PullOptionstypes.ContainerRemoveOptions→container.RemoveOptionstypes.ContainerStartOptions→container.StartOptionstypes.ContainerLogsOptions→container.LogsOptionstypes.CopyToContainerOptions→container.CopyToContainerOptionsCommit 2: Fix linting errors
types.NetworkListOptions→network.ListOptionstypes.NetworkCreate→network.CreateOptionstypes.NetworkCreateResponse→network.CreateResponsetypes.NetworkResource→network.Inspecttypes.ContainerPathStat→container.PathStattypespackage importsnetworkpackageVerification
Compatibility