Skip to content

Replace deprecated docker/docker with moby/client and moby/api#20

Merged
taraspos merged 2 commits intomasterfrom
taras/replace-docker-with-moby
Apr 7, 2026
Merged

Replace deprecated docker/docker with moby/client and moby/api#20
taraspos merged 2 commits intomasterfrom
taras/replace-docker-with-moby

Conversation

@taraspos
Copy link
Copy Markdown

@taraspos taraspos commented Apr 6, 2026

Starting with moby v29, using docker/docker package is deprecated:

The Go module github.com/docker/docker is deprecated in favor of github.com/moby/moby/client and github.com/moby/moby/api. The github.com/moby/moby module is considered an internal implementation detail - the only supported public modules are client and api.
Starting with v29, releases are tagged with the docker- prefix (e.g., docker-v29.0.0). This only affects Go module users and package maintainers.

This PR updates code to use new packages and in turn resolves vulnerability:

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 6, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 toolchain version in go.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.

Comment thread go.mod
@taraspos taraspos merged commit 4a4f3a8 into master Apr 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants