Skip to content

Move to github.com/moby/moby/client from docker/docker#4987

Open
trufflesteeeve wants to merge 2 commits into
mainfrom
move-to-moby-package
Open

Move to github.com/moby/moby/client from docker/docker#4987
trufflesteeeve wants to merge 2 commits into
mainfrom
move-to-moby-package

Conversation

@trufflesteeeve
Copy link
Copy Markdown
Contributor

@trufflesteeeve trufflesteeeve commented May 27, 2026

Moby is the preferred docker client library. The tests were also updated, because image pull options are in a different location.

Most of the changes here after updating are from go mod tidy.

Description:

The goal is to move to an updated docker package. It is only used in tests, so this isn't high priority.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

Note

Low Risk
Scope is test-only Docker client wiring and dependency housekeeping; no production scan or auth paths are changed in this diff.

Overview
This PR switches the direct Docker Engine client from github.com/docker/docker to github.com/moby/moby/client (with moby/moby/api), which is the maintained Moby split of the old monolithic module.

The only application code change is in pkg/sources/docker/docker_test.go: imports and the local-daemon setup now use dockerClient.New(dockerClient.FromEnv) and dockerClient.ImagePullOptions instead of NewClientWithOpts / types/image.PullOptions. go.mod / go.sum reflect go mod tidydocker/docker remains as an indirect dependency (e.g. testcontainers), plus minor bumps (pgregory.net/rapid, docker/go-connections, moby/term, Azure/go-ansiterm).

Reviewed by Cursor Bugbot for commit f17ce25. Bugbot is set up for automated code reviews on this repo. Configure here.

Moby is the preferred docker client library. The tests were also updated, because image pull options are in a different location.

Most of the changes here after updating are from `go mod tidy`.
@trufflesteeeve trufflesteeeve requested a review from a team May 27, 2026 22:34
@trufflesteeeve trufflesteeeve requested review from a team as code owners May 27, 2026 22:34
NewClientWithOptions is deprecated. Also client.WithAPIVersionNegotiation is now the default, so unnecessary.
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.

1 participant