Skip to content

chore(deps): drop github.com/docker/docker for split moby modules - #75

Merged
mxab merged 1 commit into
mainfrom
chore/drop-docker-docker-dep
Aug 12, 2026
Merged

chore(deps): drop github.com/docker/docker for split moby modules#75
mxab merged 1 commit into
mainfrom
chore/drop-docker-docker-dep

Conversation

@mxab

@mxab mxab commented Aug 12, 2026

Copy link
Copy Markdown
Owner

What

Removes github.com/docker/docker as a dependency, completing the move to the split upstream modules: github.com/moby/moby/api (Engine API types) and github.com/moby/moby/client (Engine API client).

Note that github.com/moby/moby/v2 is the daemon module and is deliberately not used here — depending on it from a client would pull in the whole engine.

Why

Both moby modules were already in the graph (moby/moby/api direct, moby/moby/client indirect via testcontainers-go v0.43.0), and the testcontainers bump had already moved the container/network types across. That left a single integration-tagged test file as the last consumer of docker/docker. go mod graph confirmed nothing else in the module graph required it:

github.com/mxab/nacp github.com/docker/docker@v28.5.2+incompatible

Changes

pkg/admissionctrl/notation/notation_test.go is the only source file touched:

  • Imports move to moby/moby/client and moby/moby/api/types/registry. The dockerRegistry alias is kept to avoid colliding with notation's own registry import.
  • types.ImageBuildOptions, image.RemoveOptions and image.PushOptions become client.ImageBuildOptions / client.ImageRemoveOptions / client.ImagePushOptions — the new client hangs options off the client package, so the api/types and api/types/image imports drop out entirely. Field names are unchanged.
  • ImageRemove now returns a struct, so the deferred cleanup iterates res.Items.
  • ImageInspectWithRaw was removed upstream; ImageInspect replaces it. Its result embeds image.InspectResponse, so insp.RepoDigests is unchanged.

go mod tidy promotes moby/moby/client to a direct dependency and drops moby/sys/atomicwriter and morikuni/aec, which only served docker/docker. docker/go-connections stays indirect (still required by moby/client and testcontainers-go).

Verification

  • go build ./... and go vet -tags integration ./... both clean
  • No docker/docker references remain in source, go.mod, or go.sum
  • Notation integration tests pass against a live daemon (Docker 29.6.2), exercising the real build/push/inspect round-trip:
--- PASS: TestVerifyImage (5.98s)
    --- PASS: TestVerifyImage/no_password (2.27s)
    --- PASS: TestVerifyImage/with_password (3.71s)

The full go test -tags=integration ./... suite was not run locally; CI covers it. No non-test code changed.

🤖 Generated with Claude Code

The docker/docker monolith has been split upstream into
github.com/moby/moby/api (Engine API types) and github.com/moby/moby/client
(Engine API client). Both were already in the module graph, and the
testcontainers-go v0.43.0 bump had already moved the container/network types
across, leaving a single integration-tagged test file as the last consumer of
docker/docker.

Migrate that file and drop the dependency:

- imports move to moby/moby/client and moby/moby/api/types/registry
- ImageBuildOptions, ImageRemoveOptions and ImagePushOptions now live on the
  client package rather than api/types and api/types/image
- ImageRemove returns a struct, so the deferred cleanup iterates res.Items
- ImageInspectWithRaw is gone; ImageInspect replaces it and its result embeds
  image.InspectResponse, so RepoDigests is unchanged

go mod tidy promotes moby/moby/client to a direct dependency and drops
moby/sys/atomicwriter and morikuni/aec, which only served docker/docker.

Verified with go build ./..., go vet -tags integration ./... and the notation
integration tests against a live daemon.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mxab
mxab merged commit 72afb1c into main Aug 12, 2026
2 checks passed
@mxab
mxab deleted the chore/drop-docker-docker-dep branch August 12, 2026 06:36
@sonarqubecloud

Copy link
Copy Markdown

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