Replace deprecated docker/docker with moby/client and moby/api#20
Merged
Replace deprecated docker/docker with moby/client and moby/api#20
docker/docker with moby/client and moby/api#20Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR migrates the codebase off the deprecated github.com/docker/docker Go module to the supported github.com/moby/moby/client and github.com/moby/moby/api modules, aligning with moby v29+ guidance and addressing the referenced dependency vulnerability.
Changes:
- Replace Docker API/client imports with
github.com/moby/moby/...equivalents and update call sites for the new client API shapes. - Update Go module dependencies (containerd + docker/go-connections bumps; add moby client/api modules; remove deprecated docker/docker module).
- Bump the
toolchainversion ingo.mod.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
go.mod |
Swaps deprecated docker/docker for moby client/api modules and updates related dependency versions (also bumps toolchain). |
go.sum |
Refreshes dependency checksums to match the module changes. |
docker/event_handler.go |
Updates Docker events import to the new moby API module path. |
docker/docker_handler.go |
Updates Docker client usage to moby client APIs (events/list/inspect result shapes, container state constant). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
evanfreed
approved these changes
Apr 6, 2026
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.
Starting with moby v29, using
docker/dockerpackage is deprecated:This PR updates code to use new packages and in turn resolves vulnerability: