[GH-ISSUE #348] Migrate deprecated Docker Go SDK module to supported Moby modules #5508

Closed
opened 2026-06-08 18:43:37 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @marcschaeferger on GitHub (May 9, 2026).
Original GitHub issue: https://github.com/fosrl/newt/issues/348

Originally assigned to: @marcschaeferger on GitHub.

Summary

Newt currently depends on the deprecated Docker Go SDK module:

github.com/docker/docker v28.5.2+incompatible

This module is used by docker/docker.go for Docker Engine client access, container listing/inspection, event monitoring, and Docker API types.

Docker/Moby has deprecated github.com/docker/docker starting with Docker Engine v29. The supported public Go modules are now:

github.com/moby/moby/client
github.com/moby/moby/api

This issue proposes migrating Newt away from github.com/docker/docker to the supported Moby modules.

Official upstream references

Docker Engine v29 release notes state:

The Go module github.com/docker/docker is deprecated in favor of github.com/moby/moby/client and github.com/moby/moby/api.

The Moby project README also states that, starting with Docker v29, github.com/docker/docker is deprecated and will not be updated anymore. It lists the supported public Go modules as:

  • github.com/moby/moby/client — Go client for the Docker Engine API
  • github.com/moby/moby/api — API types shared between client and server

The same migration guidance recommends replacing imports such as:

- github.com/docker/docker/client
+ github.com/moby/moby/client

- github.com/docker/docker/api/types/...
+ github.com/moby/moby/api/types/...

Source: https://docs.docker.com/engine/release-notes/29/#breaking-changes
and others
Image

Current Newt usage

Newt currently imports Docker packages in docker/docker.go:

"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/client"

These are used for:

  • creating a Docker Engine client via client.NewClientWithOpts(...)

  • API version negotiation via client.WithAPIVersionNegotiation()

  • listing containers via cli.ContainerList(...)

  • inspecting containers via cli.ContainerInspect(...)

  • watching Docker events via cli.Events(...)

  • building Docker filters via filters.NewArgs()

  • using Docker API option/response types such as:

    • container.ListOptions
    • container.InspectResponse
    • events.ListOptions
    • events.Message

Because Newt uses both the client package and API types, the migration should include both new modules.

Compatibility considerations

Docker Engine v29 includes breaking Go SDK/API changes, including renamed methods, moved types, and changed option structs. The migration may therefore require small code adjustments beyond import path changes.

Newt currently use a relatively small Docker SDK surface:

  • Docker client creation
  • container list
  • container inspect
  • event stream
  • filters
  • container/event option and response types

So the migration should be limited in scope but should still be validated.

Why this matters

Keeping github.com/docker/docker means Newt remains pinned to the old Docker Go SDK line. Since that module is deprecated and no longer updated after Docker v29, this may cause:

  • stale dependency warnings
  • vulnerability scanner findings that cannot be resolved through the old module path
  • future compatibility issues with newer Docker Engine API versions
  • harder maintenance for downstream packagers

In addition, the latest deprecated github.com/docker/docker module line is already being flagged by security scanners for current high-severity Moby vulnerabilities, for example GO-2026-4887 / CVE-2026-34040 and GO-2026-4883 / CVE-2026-33997, found in github.com/docker/docker@v28.5.2+incompatible with no fixed version available on that module path. These issues are fixed only in the newer Moby v29 module line, so downstream projects cannot fully remediate scanner findings without migrating to the supported github.com/moby/moby/api and github.com/moby/moby/client modules.

Originally created by @marcschaeferger on GitHub (May 9, 2026). Original GitHub issue: https://github.com/fosrl/newt/issues/348 Originally assigned to: @marcschaeferger on GitHub. ### Summary Newt currently depends on the deprecated Docker Go SDK module: ```go github.com/docker/docker v28.5.2+incompatible ``` This module is used by `docker/docker.go` for Docker Engine client access, container listing/inspection, event monitoring, and Docker API types. Docker/Moby has deprecated `github.com/docker/docker` starting with Docker Engine v29. The supported public Go modules are now: ```go github.com/moby/moby/client github.com/moby/moby/api ``` This issue proposes migrating Newt away from `github.com/docker/docker` to the supported Moby modules. ### Official upstream references Docker Engine v29 release notes state: > The Go module `github.com/docker/docker` is deprecated in favor of `github.com/moby/moby/client` and `github.com/moby/moby/api`. The Moby project README also states that, starting with Docker v29, `github.com/docker/docker` is deprecated and will not be updated anymore. It lists the supported public Go modules as: * `github.com/moby/moby/client` — Go client for the Docker Engine API * `github.com/moby/moby/api` — API types shared between client and server The same migration guidance recommends replacing imports such as: ```diff - github.com/docker/docker/client + github.com/moby/moby/client - github.com/docker/docker/api/types/... + github.com/moby/moby/api/types/... ``` Source: https://docs.docker.com/engine/release-notes/29/#breaking-changes and others <img width="956" height="451" alt="Image" src="https://github.com/user-attachments/assets/2e3c56e8-f0e8-4345-965d-0c636a0c4a54" /> ### Current Newt usage Newt currently imports Docker packages in `docker/docker.go`: ```go "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" ``` These are used for: * creating a Docker Engine client via `client.NewClientWithOpts(...)` * API version negotiation via `client.WithAPIVersionNegotiation()` * listing containers via `cli.ContainerList(...)` * inspecting containers via `cli.ContainerInspect(...)` * watching Docker events via `cli.Events(...)` * building Docker filters via `filters.NewArgs()` * using Docker API option/response types such as: * `container.ListOptions` * `container.InspectResponse` * `events.ListOptions` * `events.Message` Because Newt uses both the client package and API types, the migration should include both new modules. ### Compatibility considerations Docker Engine v29 includes breaking Go SDK/API changes, including renamed methods, moved types, and changed option structs. The migration may therefore require small code adjustments beyond import path changes. Newt currently use a relatively small Docker SDK surface: * Docker client creation * container list * container inspect * event stream * filters * container/event option and response types So the migration should be limited in scope but should still be validated. ### Why this matters Keeping `github.com/docker/docker` means Newt remains pinned to the old Docker Go SDK line. Since that module is deprecated and no longer updated after Docker v29, this may cause: * stale dependency warnings * vulnerability scanner findings that cannot be resolved through the old module path * future compatibility issues with newer Docker Engine API versions * harder maintenance for downstream packagers In addition, the latest deprecated `github.com/docker/docker` module line is already being flagged by security scanners for current high-severity Moby vulnerabilities, for example `GO-2026-4887` / `CVE-2026-34040` and `GO-2026-4883` / `CVE-2026-33997`, found in `github.com/docker/docker@v28.5.2+incompatible` with no fixed version available on that module path. These issues are fixed only in the newer Moby v29 module line, so downstream projects cannot fully remediate scanner findings without migrating to the supported `github.com/moby/moby/api` and `github.com/moby/moby/client` modules.
GiteaMirror added the dockergodependencies labels 2026-06-08 18:43:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/newt#5508