chore(deps): drop github.com/docker/docker for split moby modules - #75
Merged
Conversation
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>
|
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.



What
Removes
github.com/docker/dockeras a dependency, completing the move to the split upstream modules:github.com/moby/moby/api(Engine API types) andgithub.com/moby/moby/client(Engine API client).Note that
github.com/moby/moby/v2is 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/apidirect,moby/moby/clientindirect via testcontainers-go v0.43.0), and the testcontainers bump had already moved thecontainer/networktypes across. That left a single integration-tagged test file as the last consumer ofdocker/docker.go mod graphconfirmed nothing else in the module graph required it:Changes
pkg/admissionctrl/notation/notation_test.gois the only source file touched:moby/moby/clientandmoby/moby/api/types/registry. ThedockerRegistryalias is kept to avoid colliding with notation's ownregistryimport.types.ImageBuildOptions,image.RemoveOptionsandimage.PushOptionsbecomeclient.ImageBuildOptions/client.ImageRemoveOptions/client.ImagePushOptions— the new client hangs options off theclientpackage, so theapi/typesandapi/types/imageimports drop out entirely. Field names are unchanged.ImageRemovenow returns a struct, so the deferred cleanup iteratesres.Items.ImageInspectWithRawwas removed upstream;ImageInspectreplaces it. Its result embedsimage.InspectResponse, soinsp.RepoDigestsis unchanged.go mod tidypromotesmoby/moby/clientto a direct dependency and dropsmoby/sys/atomicwriterandmorikuni/aec, which only serveddocker/docker.docker/go-connectionsstays indirect (still required bymoby/clientand testcontainers-go).Verification
go build ./...andgo vet -tags integration ./...both cleandocker/dockerreferences remain in source,go.mod, orgo.sumThe full
go test -tags=integration ./...suite was not run locally; CI covers it. No non-test code changed.🤖 Generated with Claude Code