client 0.1.0
The first release candidate of a Go module github.com/moby/moby/client dedicated for the Moby API client making the old github.com/docker/docker/client package obsolete.
Changelog
api/pkg/progressandapi/pkg/streamformatterhave been removed. moby/moby#51153api/types/versionshas moved to the client and daemon. moby/moby#51284client.ConfigCreate,client.ConfigList,client.ConfigInspectWithRaw,client.ConfigUpdate, andclient.ConfigRemovemethods now accept option structs instead of positional arguments, and return dedicated result structs. moby/moby#51078client.ImageBuild,client.BuildCancel,client.ImageList,client.ImageRemove,client.ImageTag, andclient.ImageSearchmethods now accept option structs instead of positional arguments, and return dedicated result structs. moby/moby#51227client/pkg/jsonmessage: remove deprecatedProgressMessage,ErrorMessage,DisplayJSONMessagesToStreamandStreaminterface. moby/moby#49264client:ContainerExec...methods were renamed toExec.... moby/moby#51262client: Wrap return values ofImageInspect,ImageHistory,ImageLoadandImageSavein a struct. moby/moby#51236eventsAPI now reports content-type asapplication/x-ndjsonfor newline-delimited JSON event stream. moby/moby#50953ImagePullnow returns an object withJSONMessagesmethod returning iterator over the message objects. moby/moby#50935ImagePushnow returns an object withJSONMessagesmethod returning iterator over the message objects. moby/moby#51148- api/types/build: move
CachePruneOptionstype toclient.BuildCachePruneOptions. moby/moby#50772 - api/types/build: move build options to client and backend. moby/moby#50907
- api/types/checkpoint: move checkpoint options to client module. moby/moby#50905
- api/types/container: merge InspectResponse and ContainerJSONBase. moby/moby#50809
- api/types/container: move
ResizeOptionstype toContainerResizeOptionsin the client. moby/moby#50773 - api/types/container: move
StatsResponseReadertoclientpackage. moby/moby#50521 - api/types/container: move container options to client. moby/moby#50897
- api/types/container: move ExecInspect type to client. moby/moby#50991
- api/types/container: remove deprecated Config.MacAddress. moby/moby#51194
- api/types/container: StatsResponse: add OSType field. moby/moby#51305
- api/types/events: move
ListOptionstype to the clientEventsListOptions. moby/moby#50774 - api/types/filters: remove deprecated
ToParamWithVersion. moby/moby#50561 - api/types/image: move image options out to the client. moby/moby#50776
- api/types/image: move LoadResponse to client. moby/moby#50909
- api/types/network: CreateRequest: remove deprecated CheckDuplicate field. moby/moby#50998
- api/types/network: define
ConnectRequestandDisconnectRequest. moby/moby#51324 - api/types/network: move
CreateOptions,ConnectOptionsandDisconnectOptionsto the client module. moby/moby#50817 - api/types/network: move the
ListOptionsandInspectOptionstypes to the client. moby/moby#50786 - api/types/plugin: change ListResponse to a non-pointer slice. moby/moby#51440
- api/types/registry: move
SearchOptionstoImageSearchOptionsin the client. moby/moby#50787 - api/types/registry: rename AuthenticateOKBody to AuthResponse. moby/moby#51334
- api/types/strslice: deprecate StrSlice in favor of using a regular
[]string. moby/moby#50292 - api/types/swarm: create types for enum-consts. moby/moby#51399
- api/types/swarm: move option types to the client module. moby/moby#50794
- api/types/swarm: move the
SecretListOptionstype to the client module. moby/moby#50816 - api/types/system: deprecated top level
DiskUsagefields for type specific fields. moby/moby#51235 - api/types/system: move
DiskUsageOptionsto the client. moby/moby#50788 - api/types/system: move
SecurityOptandDecodeSecurityOptionsto client module. moby/moby#50825 - api/types/volume: change ListResponse.Volumes to a non-pointer slice. moby/moby#51454
- api/types/volume: move
CreateOptionstoclient.VolumeCreateOptions. moby/moby#51211 - api/types/volume: move the
ListOptionstype to the client module. moby/moby#50789 - api/types/volume: moved
UpdateOptionsinto client module. moby/moby#51205 - api/types: move client.go contents into moby/moby/client. moby/moby#50510
- api/types: move disk usage structs to per type packages. moby/moby#51406
- api/types: move ErrorResponse to common/ErrorResponse. moby/moby#50632
- api/types: move Ping and swarm.Status to client. moby/moby#51258
- api/types: move plugin types to api/types/plugin. moby/moby#48114
- api/types: move Version to api/types/system. moby/moby#51359
- api/types: use regular slices for disk usage types. moby/moby#51412
- api: move "DiskUsage" related types to the right location. moby/moby#50518
- api: remove / internalize LegacyDiskUsage. moby/moby#51437
- api: remove unused
DefaultVersion,MinSupportedAPIVersionconsts. moby/moby#50587 - Bump api version in client and main module to v1.52.0-alpha.1. moby/moby#50641
- chore: enable use-any rule from revive. moby/moby#50672
- client, integration-cli: adjust for go1.25, TLS1.3 handshake. moby/moby#51055
- client, api: update go.mod to go1.24. moby/moby#51460
- client/build_*: Add options struct, wrap result. moby/moby#51076
- client/checkpoint_list: Wrap result in a struct. moby/moby#51050
- client/container_copy: Wrap options and result struct. moby/moby#51328
- client/container_exec: Separate structs for Start and Attach. moby/moby#51289
- client/container_update: Wrap options and result. moby/moby#51326
- client/distribution_inspect: Wrap options and result. moby/moby#51264
- client/node: Wrap options and output. moby/moby#51260
- client/pkg/jsonmessage: refactor in terms of
api/types/jsonstream. moby/moby#51156 - client/pkg/jsonmessage: remove unused fields. moby/moby#50759
- client/pkg/security: simplify. moby/moby#51381
- client/secrets: Wrap results and options. moby/moby#51251
- client/volume: refactor volume options and responses. moby/moby#51210
- client:
ContainerCommitOptions: removePausefield in favor ofNoPause. moby/moby#51019 - client: add
DefaultAPIVersionconst, which defines the default (and maximum) API version supported by the client. moby/moby#50433 - client: add
ExecAPIClientinterface for exec methods provided by the client. moby/moby#50997 - client: add option and output structs for various container methods. moby/moby#51308
- client: assorted fixes and refactor. moby/moby#51285
- client: change Raw fields to be json.RawMessage. moby/moby#51288
- client: check for Digested reference instead of Canonical. moby/moby#50798
- client: checkpoint: add output structs and fix naming. moby/moby#51450
- client: cleanup and re-group interfaces. moby/moby#51402
- client: cleanup encoding body and add test-coverage. moby/moby#50432
- client: Client.addHeaders: remove special handling for api < 1.25. moby/moby#50246
- client: Client.ContainerCreate: fix panic when passing a nil config. moby/moby#51001
- client: Client.negotiateAPIVersionPing: trim v-prefix before handling. moby/moby#51020
- client: Client.Ping: improve error handling and fallback, and assorted fixes/cleanups. moby/moby#50709
- client: Client.PluginList: add options-struct. moby/moby#51207
- client: ContainerExecAttach: update GoDoc links. moby/moby#50411
- client: ContainersPrune: rewrite to use option structs and result. moby/moby#51200
- client: ContainerStats: add option, output-structs, remove ContainerStatsOneShot. moby/moby#51293
- client: ContainerWait: touch-up GoDoc, and remove legacy code, and use singular for channels (ContainerWaitResult). moby/moby#51323
- client: deprecate NewClientWithOpts in favor of New. moby/moby#51333
- client: ExecCreate: rename Tty to TTY, change ConsoleSize to a ConsoleSize type. moby/moby#51400
- client: Filters: add Clone method. moby/moby#51163
- client: fix example, and add runnable example. moby/moby#51330
- client: fix example, and update refs to old modules. moby/moby#50484
- client: fix ImageLoadResult GoDoc. moby/moby#51296
- client: fix some version-related handling. moby/moby#51005
- client: gofumpt. moby/moby#51265
- client: ImageBuildResponse: remove OSType field. moby/moby#50995
- client: ImagePullResponse: don't panic without reader. moby/moby#51159
- client: ImagePullResponse: use sync.OnceValue. moby/moby#51160
- client: ImagesPrune: rewrite to use option structs and result. moby/moby#51200
- client: merge ContainerInspectWithRaw with ContainerInspect. moby/moby#51290
- client: Migrate tests to use functional opts and extract
clientConfig. moby/moby#50847 - client: move ExecStartOptions, ExecAttachOptions, ExecOptions to client. moby/moby#50978
- client: NetworkInspect, NetworkList: wrap output structs, and remove NetworkInspectWithRaw. moby/moby#51245
- client: NetworksPrune: rewrite to use option structs and result. moby/moby#51200
- client: omit empty auth headers and use registry.RequestAuthConfig. moby/moby#50256
- client: pkg/streamformatter: un-export unused utilities. moby/moby#51429
- client: please the linters. moby/moby#51266
- client: PluginInspectWithRaw: refactor and rename to PluginInspect. moby/moby#51254
- client: PluginListResult: change Items field to a non-pointer slice. moby/moby#51440
- client: prepare option-structs for multiple platforms. moby/moby#51342
- client: reduce uses of obsolete API versions in tests. moby/moby#51071
- client: refactor
ContainerExportto wrap options/result structs. moby/moby#51316 - client: refactor
ContainerListto wrap result. moby/moby#51314 - client: refactor
ContainerLogsto wrap result. moby/moby#51317 - client: refactor
ContainerRenameto wrap options/result structs. moby/moby#51315 - client: refactor
ContainerTopto wrap options and results. moby/moby#51313 - client: refactor ContainerWait to use client defined options/results structs. moby/moby#51312
- client: refactor create network api implementation to define options/result struct. moby/moby#51269
- client: refactor Events, Info, RegistryLogin. moby/moby#51320
- client: refactor NetworkConnect, NetworkDisconnect, NetworkRemove. moby/moby#51325
- client: refactor plugin api client functions to define options/result…. moby/moby#51256
- client: refactor ServerVersion to return ServerVersionResult. moby/moby#51233
- client: refactor service api client functions for defined options/res…. moby/moby#51252
- client: refactor ServiceCreate, ServiceUpdate, SwarmUpdate. moby/moby#51279
- client: refactor swarm api functions to wrap params/responses. moby/moby#51244
- client: refactor task responses. moby/moby#51234
- client: remove
APIClient.ImageInspectWithRawfrom theAPIClientinterface. moby/moby#50485 - client: remove
ImageAPIClient.ImageInspectWithRawfrom theImageAPIClientinterface. moby/moby#50485 - client: remove
ImageAPIClientDeprecated.ImageInspectWithRawfrom theImageAPIClientDeprecated. moby/moby#50485 - client: Remove
ImageCreatemethod - useImagePullorImageImportinstead. moby/moby#51366 - client: remove API-version compatibility for API < v1.44. moby/moby#51120
- client: remove client.ContainerStatsResult.OSType field. moby/moby#51305
- client: remove deprecated
ErrorConnectionFailedandIsErrNotFoundfunctions. moby/moby#50485 - client: remove deprecated
ImageListOptions.ContainerCount. moby/moby#51006 - client: remove deprecated
NewClientandNewEnvClientfunctions. moby/moby#50485 - client: remove ImageInspectWithAPIOpts function. moby/moby#50930
- client: remove ImageLoadResult.JSON. moby/moby#51297
- client: remove legacy CBC cipher suites from client config. moby/moby#50126
- client: remove NegotiateAPIVersion, NegotiateAPIVersionPing. moby/moby#51307
- client: remove support for API < v1.22 (docker < 1.10) filter format. moby/moby#50984
- client: remove support for negotiating API version < v1.44 (docker 25.0). moby/moby#51119
- client: remove the
CommonAPIClientinterface. moby/moby#50485 - client: remove the
ImageAPIClientDeprecatedinterface. moby/moby#50485 - client: remove the deprecated
Client.ImageInspectWithRawmethod. moby/moby#50485 - client: remove unused
Client.HTTPClient()method. moby/moby#51011 - client: remove unused hasEndpointSpecificMacAddress utility. moby/moby#51275
- client: remove unused import. moby/moby#51332
- client: remove uses of deprecated NewClientWithOpts. moby/moby#51431
- client: remove VolumeInspectWithRaw, merge with VolumeInspect. moby/moby#51247
- client: rename
ServiceListResult.ServicestoServiceListResult.Items. moby/moby#51273 - client: rename ConfigListResult.Configs to ConfigListResult.Items. moby/moby#51249
- client: Rename ContainerUnPause* to ContainerUnpause*. moby/moby#51322
- client: rename validateAPIVersion to validateServiceSpecForAPIVersion. moby/moby#51003
- client: rename VolumeListResult.List to VolumeListResult.Items. moby/moby#51246
- client: ServerVersionResult: add back legacy fields. moby/moby#51358
- client: simplify test with mock-responses. moby/moby#51277
- client: singularize prune methods. moby/moby#51403
- client: SwarmInspect, VolumeInspect: add options struct. moby/moby#51255
- client: TestContainerInspectWithEmptyID test both inspect variants. moby/moby#50385
- client: tidy go.mod. moby/moby#50979, moby/moby#50629
- client: tidy-up test/mock-utilities. moby/moby#51276
- client: touch-up godoc. moby/moby#50611
- client: un-export NewVersionError, rename to requiresVersion. moby/moby#51327
- client: use cancelReadCloser for readers. moby/moby#51306
- client: use interface for return types. moby/moby#51383
- client: use stdlib errors. moby/moby#50630
- client: use sub-tests for ContainerLogs, ServiceLogs tests. moby/moby#51340
- client: VolumePruneOptions: add "All" option. moby/moby#51208
- client: VolumeRemove, VolumeUpdate: add output struct. moby/moby#51310
- client: VolumesPrune: rewrite to use option structs and result. moby/moby#51200
- client: WithMockClient: match version behavior of actual client. moby/moby#51002
- client_(attach,commit,create,diff): Wrap result and options. moby/moby#51278
- Copy the api/types/time package to internal client/daemon packages. moby/moby#50722
- Create github.com/moby/moby/api and github.com/moby/moby/client module. moby/moby#50280
- daemon, client: remove version-gate for daemon-side AutoRemove. moby/moby#51073
- daemon: improve validation for container rename. moby/moby#51336
- deprecate
pkg/stdcopy, which was moved toapi/stdcopy. moby/moby#50462 - deprecate pkg/stringid in favour of github.com/moby/moby/client/pkg/stringid. moby/moby#50504
- docs(client/ContainerExecAttach): add a mention to stdcopy.StdCopy. moby/moby#50119
- Fix data race in
ContainerExecStart,ContainerList, andEvents. moby/moby#50448 - Fix some faulty defers in tests. moby/moby#51304
- fix: client vendor with config struct changes. moby/moby#50886
- fix: easiest revive rules. moby/moby#50262
- Improve errors when failing to connect to the API to provide more context to the user. moby/moby#50285
- move endpoint API version constraints to API server. moby/moby#50987
- Move jsonmessage, streamformatter, and progress. moby/moby#50565
- Remove
buildkit.ClientOpts. moby/moby#50318 - Remove dependency on httputil for client hijack test. moby/moby#50270
- Remove dependency on testutil from client. moby/moby#50271
- remove deprecated
types/plugins/logdriverandtypes/swarm/runtimepackages; plugin-runtime spec is now exposed astypes/swarm.RuntimeSpecandtypes/swarm.RuntimePrivilege. moby/moby#50554 - Remove support for deprecated kernel memory limit. moby/moby#50989
- Rename disk usage API fields. moby/moby#51428
- Replace use of env test util with standard library call. moby/moby#50317
- the client now uses its own
client.Filterstype for filtering API requests, with a more ergonomic interface. Users of thegithub.com/docker/docker/api/types/filterspackage will need to refactor when they upgrade to the v29 client. moby/moby#51115 - Types
"github.com/moby/moby/api/types/network".Summaryand"github.com/moby/moby/api/types/network".Inspectare no longer aliases, and most of their fields have been moved into an embedded struct. Engine API clients may require some source-level changes when migrating to the new github.com/moby/moby/api module. moby/moby#50878