mirror of
https://github.com/fosrl/newt.git
synced 2026-07-11 22:21:25 -05:00
[GH-ISSUE #348] Migrate deprecated Docker Go SDK module to supported Moby modules #7201
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
This module is used by
docker/docker.gofor Docker Engine client access, container listing/inspection, event monitoring, and Docker API types.Docker/Moby has deprecated
github.com/docker/dockerstarting with Docker Engine v29. The supported public Go modules are now:This issue proposes migrating Newt away from
github.com/docker/dockerto the supported Moby modules.Official upstream references
Docker Engine v29 release notes state:
The Moby project README also states that, starting with Docker v29,
github.com/docker/dockeris 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 APIgithub.com/moby/moby/api— API types shared between client and serverThe same migration guidance recommends replacing imports such as:
Source: https://docs.docker.com/engine/release-notes/29/#breaking-changes

and others
Current Newt usage
Newt currently imports Docker packages in
docker/docker.go: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.ListOptionscontainer.InspectResponseevents.ListOptionsevents.MessageBecause 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:
So the migration should be limited in scope but should still be validated.
Why this matters
Keeping
github.com/docker/dockermeans 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:In addition, the latest deprecated
github.com/docker/dockermodule line is already being flagged by security scanners for current high-severity Moby vulnerabilities, for exampleGO-2026-4887/CVE-2026-34040andGO-2026-4883/CVE-2026-33997, found ingithub.com/docker/docker@v28.5.2+incompatiblewith 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 supportedgithub.com/moby/moby/apiandgithub.com/moby/moby/clientmodules.