Skip to content

migrate to github.com/moby/moby/client module#500

Merged
wagoodman merged 1 commit intoanchore:mainfrom
thaJeztah:bump_docker
Mar 4, 2026
Merged

migrate to github.com/moby/moby/client module#500
wagoodman merged 1 commit intoanchore:mainfrom
thaJeztah:bump_docker

Conversation

@thaJeztah
Copy link
Copy Markdown
Contributor

@thaJeztah thaJeztah commented Jan 12, 2026

@thaJeztah thaJeztah force-pushed the bump_docker branch 6 times, most recently from 24b4229 to 81ae0e2 Compare January 15, 2026 16:40
@thaJeztah
Copy link
Copy Markdown
Contributor Author

thaJeztah commented Jan 20, 2026

I should note that this drops support for EOL versions of Docker (Docker < v25.0), and only supports API versions v1.44 and up; https://pkg.go.dev/github.com/moby/moby/client@v0.2.1#MinAPIVersion

At least for automatic version negotiation; it does still allow overriding the API version through the DOCKER_API_VERSION env-var (through WithAPIVersionFromEnv; https://pkg.go.dev/github.com/moby/moby/client@v0.2.1#WithAPIVersionFromEnv)

@thaJeztah thaJeztah marked this pull request as ready for review January 20, 2026 14:00
@thaJeztah
Copy link
Copy Markdown
Contributor Author

/cc @kzantow @wagoodman this one should be ready for review

I should note that this drops support for EOL versions of Docker (Docker < v25.0), and only supports API versions v1.44 and up; https://pkg.go.dev/github.com/moby/moby/client@v0.2.1#MinAPIVersion

At least for automatic version negotiation; it does still allow overriding the API version through the DOCKER_API_VERSION env-var (through WithAPIVersionFromEnv; https://pkg.go.dev/github.com/moby/moby/client@v0.2.1#WithAPIVersionFromEnv)

@kzantow
Copy link
Copy Markdown
Contributor

kzantow commented Jan 20, 2026

Thanks for this, I see the Docker repo now redirects to Moby. Due to the minimum version change, it's going to take some due diligence to understand if we are able to take this change yet, so apologies in advance if it's not merged with a lot of haste 🤞

@kzantow kzantow added the needs-discussion to be discussed at upcoming community gardening label Jan 20, 2026
@thaJeztah
Copy link
Copy Markdown
Contributor Author

I see the Docker repo now redirects to Moby.

Yeah, the redirect was in place for quite some Years, but the go code was still using github.com/docker/docker as import path because it was not yet a module (didn't have a go.mod).

The repository is not a multi-module repository with 3 modules;

  • github.com/moby/moby/v2 - Module containing the source code for the daemon and dockerd binary itself; this module does not have a stable Go API and is not intended to be used as dependency module (only for building binaries)
  • github.com/moby/moby/client - Module containing the API client code. This is the module most will be interested in. It's not v1.0.0 yet, as there's still work to be done, but the old docker/docker/client module will no longer receive updates.
  • github.com/moby/moby/api - Module containing API definitions (swagger), and related Go types.

It's going to take some due diligence to understand if we are able to take this change yet, so apologies in advance if it's not merged with a lot of haste 🤞

Sure, no problem! Let me know if help / input is needed 👍

@wagoodman wagoodman enabled auto-merge (squash) February 12, 2026 20:51
@wagoodman wagoodman removed the needs-discussion to be discussed at upcoming community gardening label Feb 12, 2026
@wagoodman
Copy link
Copy Markdown
Contributor

Thanks @thaJeztah for your work on this 🙌 !

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@wagoodman wagoodman merged commit 7b5e393 into anchore:main Mar 4, 2026
7 checks passed
@thaJeztah
Copy link
Copy Markdown
Contributor Author

Thanks! Oh for this one;

I should note that this drops support for EOL versions of Docker (Docker < v25.0), and only supports API versions v1.44 and up; https://pkg.go.dev/github.com/moby/moby/client@v0.2.1#MinAPIVersion

The upcoming v0.2.3 version of the client module lowers the minimum version to API v1.40 (docker 19.03 and up); there may be some limitations, but probably really edge-case (not impacting code here). It's not released yet, but should be a straight update once it's there 👍

@thaJeztah thaJeztah deleted the bump_docker branch March 4, 2026 15:31
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