Upgrade Docker SDK v24→v27 to fix API version 1.43 incompatibility#117
Upgrade Docker SDK v24→v27 to fix API version 1.43 incompatibility#117
Conversation
…ility Agent-Logs-Url: https://github.com/kitproj/kit/sessions/f1fbf180-bcb3-4df7-8669-82de47bb0eb4 Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Docker Go SDK to a newer major version to resolve failures against newer Docker daemons that reject API version 1.43, and updates call sites to match Docker SDK package/type reorganizations.
Changes:
- Upgrade
github.com/docker/dockerfrom v24 → v27 and refresh transitive deps (go.mod/go.sum). - Update Docker SDK imports/types in container execution code to the newer
api/types/{container,image}option structs and newgithub.com/distribution/referencemodule. - Update the hack example image-pull helper to use the new
image.PullOptionstype.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
internal/proc/container.go |
Updates Docker SDK imports and switches to new option types for container/image APIs. |
hack/examples.go |
Switches ImagePull options type to dockerimage.PullOptions. |
go.mod |
Upgrades Docker SDK version and adds github.com/distribution/reference; also changes Go version directive. |
go.sum |
Updates checksums for upgraded/added dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Alex Collins <alexec@users.noreply.github.com>
|
@copilot fix build, keeping older go version if possible, if not, then upgrade. |
…ctive Agent-Logs-Url: https://github.com/kitproj/kit/sessions/6960cfd2-2178-412a-bea7-8cbff082c2e5 Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Fixed in bbafcef. The CI failure was caused by transitive otel packages (v1.42.0) requiring Go 1.25, while go.mod specified |
Newer Docker daemons enforce a minimum API version of 1.44, causing pulls to fail with
client version 1.43 is too old. The root cause wasgithub.com/docker/docker v24.0.9, whose max supported API version is 1.43.Changes
go.mod: Upgradegithub.com/docker/dockerv24.0.9 → v27.5.1 (default API version 1.47)internal/proc/container.go/hack/examples.go: Update to types reorganized in v25+:github.com/docker/distribution/reference→github.com/distribution/referencedockertypes.{ContainerRemoveOptions,ContainerStartOptions,ContainerLogsOptions,ContainerListOptions}→dockercontainer.{RemoveOptions,StartOptions,LogsOptions,ListOptions}dockertypes.ImagePullOptions→dockerimage.PullOptions(newgithub.com/docker/docker/api/types/imageimport)