From bab3e81e1d8874a2d4f26afc02225ee537d0b15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Mon, 26 Jan 2026 20:15:02 +0100 Subject: [PATCH 1/2] vendor: github.com/moby/moby/api v1.53.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit full diff: https://github.com/moby/moby/api/compare/v1.53.0-rc.2...v1.53.0 Signed-off-by: PaweÅ‚ Gronowski --- vendor.mod | 2 +- vendor.sum | 4 ++-- .../github.com/moby/moby/api/pkg/authconfig/authconfig.go | 6 +++++- vendor/github.com/moby/moby/api/types/network/endpoint.go | 6 +++--- vendor/github.com/moby/moby/api/types/network/hwaddr.go | 8 +++++--- vendor/github.com/moby/moby/api/types/network/ipam.go | 6 +++--- vendor/github.com/moby/moby/api/types/swarm/network.go | 8 ++++---- vendor/github.com/moby/moby/api/types/swarm/task.go | 6 +++--- vendor/modules.txt | 2 +- 9 files changed, 27 insertions(+), 21 deletions(-) diff --git a/vendor.mod b/vendor.mod index 7ef6366ad8fb..1a5c333bf396 100644 --- a/vendor.mod +++ b/vendor.mod @@ -28,7 +28,7 @@ require ( github.com/google/uuid v1.6.0 github.com/mattn/go-runewidth v0.0.19 github.com/moby/go-archive v0.2.0 - github.com/moby/moby/api v1.53.0-rc.2 + github.com/moby/moby/api v1.53.0 github.com/moby/moby/client v0.2.2-rc.2 github.com/moby/patternmatcher v0.6.0 github.com/moby/swarmkit/v2 v2.1.1 diff --git a/vendor.sum b/vendor.sum index be88509d3e24..7433aa04116f 100644 --- a/vendor.sum +++ b/vendor.sum @@ -113,8 +113,8 @@ github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3N github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/go-archive v0.2.0 h1:zg5QDUM2mi0JIM9fdQZWC7U8+2ZfixfTYoHL7rWUcP8= github.com/moby/go-archive v0.2.0/go.mod h1:mNeivT14o8xU+5q1YnNrkQVpK+dnNe/K6fHqnTg4qPU= -github.com/moby/moby/api v1.53.0-rc.2 h1:Ajc2MnWJRC2AAqhIGNaqvwaA2mMYKyuso5PjxPP2KM4= -github.com/moby/moby/api v1.53.0-rc.2/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= +github.com/moby/moby/api v1.53.0 h1:PihqG1ncw4W+8mZs69jlwGXdaYBeb5brF6BL7mPIS/w= +github.com/moby/moby/api v1.53.0/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= github.com/moby/moby/client v0.2.2-rc.2 h1:j8cmCofnlLCimDzFUYsrrACJZWsRiq0ZqGrbbVX2fFs= github.com/moby/moby/client v0.2.2-rc.2/go.mod h1:LxIGylF1oOCPvokq90dMSUy44ODFFLkt2vRgDE1RKck= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= diff --git a/vendor/github.com/moby/moby/api/pkg/authconfig/authconfig.go b/vendor/github.com/moby/moby/api/pkg/authconfig/authconfig.go index 51f883e1c236..d1b0105a6894 100644 --- a/vendor/github.com/moby/moby/api/pkg/authconfig/authconfig.go +++ b/vendor/github.com/moby/moby/api/pkg/authconfig/authconfig.go @@ -71,11 +71,15 @@ func DecodeRequestBody(r io.ReadCloser) (*registry.AuthConfig, error) { func decode(r io.Reader) (*registry.AuthConfig, error) { authConfig := ®istry.AuthConfig{} - if err := json.NewDecoder(r).Decode(authConfig); err != nil { + dec := json.NewDecoder(r) + if err := dec.Decode(authConfig); err != nil { // always return an (empty) AuthConfig to increase compatibility with // the existing API. return ®istry.AuthConfig{}, invalid(fmt.Errorf("invalid JSON: %w", err)) } + if dec.More() { + return ®istry.AuthConfig{}, invalid(errors.New("multiple JSON documents not allowed")) + } return authConfig, nil } diff --git a/vendor/github.com/moby/moby/api/types/network/endpoint.go b/vendor/github.com/moby/moby/api/types/network/endpoint.go index cd39c579f081..c4c1766cf297 100644 --- a/vendor/github.com/moby/moby/api/types/network/endpoint.go +++ b/vendor/github.com/moby/moby/api/types/network/endpoint.go @@ -58,9 +58,9 @@ func (es *EndpointSettings) Copy() *EndpointSettings { // EndpointIPAMConfig represents IPAM configurations for the endpoint type EndpointIPAMConfig struct { - IPv4Address netip.Addr `json:",omitempty"` - IPv6Address netip.Addr `json:",omitempty"` - LinkLocalIPs []netip.Addr `json:",omitempty"` + IPv4Address netip.Addr `json:"IPv4Address,omitzero"` + IPv6Address netip.Addr `json:"IPv6Address,omitzero"` + LinkLocalIPs []netip.Addr `json:"LinkLocalIPs,omitempty"` } // Copy makes a copy of the endpoint ipam config diff --git a/vendor/github.com/moby/moby/api/types/network/hwaddr.go b/vendor/github.com/moby/moby/api/types/network/hwaddr.go index 9d0c2b4b6221..b2a4dfb1a129 100644 --- a/vendor/github.com/moby/moby/api/types/network/hwaddr.go +++ b/vendor/github.com/moby/moby/api/types/network/hwaddr.go @@ -11,9 +11,11 @@ import ( // in the absence of go.dev/issue/29678. type HardwareAddr net.HardwareAddr -var _ encoding.TextMarshaler = (HardwareAddr)(nil) -var _ encoding.TextUnmarshaler = (*HardwareAddr)(nil) -var _ fmt.Stringer = (HardwareAddr)(nil) +var ( + _ encoding.TextMarshaler = (HardwareAddr)(nil) + _ encoding.TextUnmarshaler = (*HardwareAddr)(nil) + _ fmt.Stringer = (HardwareAddr)(nil) +) func (m *HardwareAddr) UnmarshalText(text []byte) error { if len(text) == 0 { diff --git a/vendor/github.com/moby/moby/api/types/network/ipam.go b/vendor/github.com/moby/moby/api/types/network/ipam.go index e57be481b72c..3fb357fc6c4f 100644 --- a/vendor/github.com/moby/moby/api/types/network/ipam.go +++ b/vendor/github.com/moby/moby/api/types/network/ipam.go @@ -13,9 +13,9 @@ type IPAM struct { // IPAMConfig represents IPAM configurations type IPAMConfig struct { - Subnet netip.Prefix `json:",omitempty"` - IPRange netip.Prefix `json:",omitempty"` - Gateway netip.Addr `json:",omitempty"` + Subnet netip.Prefix `json:"Subnet,omitzero"` + IPRange netip.Prefix `json:"IPRange,omitzero"` + Gateway netip.Addr `json:"Gateway,omitzero"` AuxAddress map[string]netip.Addr `json:"AuxiliaryAddresses,omitempty"` } diff --git a/vendor/github.com/moby/moby/api/types/swarm/network.go b/vendor/github.com/moby/moby/api/types/swarm/network.go index 65aabc9d3689..a70ac0690e2d 100644 --- a/vendor/github.com/moby/moby/api/types/swarm/network.go +++ b/vendor/github.com/moby/moby/api/types/swarm/network.go @@ -61,7 +61,7 @@ type EndpointVirtualIP struct { // Addr is the virtual ip address. // This field accepts CIDR notation, for example `10.0.0.1/24`, to maintain backwards // compatibility, but only the IP address is used. - Addr netip.Prefix `json:",omitempty"` + Addr netip.Prefix `json:"Addr,omitzero"` } // Network represents a network. @@ -111,7 +111,7 @@ type IPAMOptions struct { // IPAMConfig represents ipam configuration. type IPAMConfig struct { - Subnet netip.Prefix `json:",omitempty"` - Range netip.Prefix `json:",omitempty"` - Gateway netip.Addr `json:",omitempty"` + Subnet netip.Prefix `json:"Subnet,omitzero"` + Range netip.Prefix `json:"Range,omitzero"` + Gateway netip.Addr `json:"Gateway,omitzero"` } diff --git a/vendor/github.com/moby/moby/api/types/swarm/task.go b/vendor/github.com/moby/moby/api/types/swarm/task.go index 83f87028bcbb..e2633037df96 100644 --- a/vendor/github.com/moby/moby/api/types/swarm/task.go +++ b/vendor/github.com/moby/moby/api/types/swarm/task.go @@ -109,14 +109,14 @@ type Limit struct { Pids int64 `json:",omitempty"` } -// GenericResource represents a "user defined" resource which can +// GenericResource represents a "user-defined" resource which can // be either an integer (e.g: SSD=3) or a string (e.g: SSD=sda1) type GenericResource struct { NamedResourceSpec *NamedGenericResource `json:",omitempty"` DiscreteResourceSpec *DiscreteGenericResource `json:",omitempty"` } -// NamedGenericResource represents a "user defined" resource which is defined +// NamedGenericResource represents a "user-defined" resource which is defined // as a string. // "Kind" is used to describe the Kind of a resource (e.g: "GPU", "FPGA", "SSD", ...) // Value is used to identify the resource (GPU="UUID-1", FPGA="/dev/sdb5", ...) @@ -125,7 +125,7 @@ type NamedGenericResource struct { Value string `json:",omitempty"` } -// DiscreteGenericResource represents a "user defined" resource which is defined +// DiscreteGenericResource represents a "user-defined" resource which is defined // as an integer // "Kind" is used to describe the Kind of a resource (e.g: "GPU", "FPGA", "SSD", ...) // Value is used to count the resource (SSD=5, HDD=3, ...) diff --git a/vendor/modules.txt b/vendor/modules.txt index d0b0db9ebd90..c2880d8d7314 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -167,7 +167,7 @@ github.com/moby/docker-image-spec/specs-go/v1 github.com/moby/go-archive github.com/moby/go-archive/compression github.com/moby/go-archive/tarheader -# github.com/moby/moby/api v1.53.0-rc.2 +# github.com/moby/moby/api v1.53.0 ## explicit; go 1.24.0 github.com/moby/moby/api/pkg/authconfig github.com/moby/moby/api/pkg/stdcopy From 9c9ec7358833bb3e5622a166673744fca7fefac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Mon, 26 Jan 2026 20:15:30 +0100 Subject: [PATCH 2/2] vendor: github.com/moby/moby/client v0.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit full diff: https://github.com/moby/moby/client/compare/v0.2.2-rc.2...v0.2.2 Signed-off-by: PaweÅ‚ Gronowski --- vendor.mod | 2 +- vendor.sum | 4 +-- vendor/github.com/moby/moby/client/client.go | 8 ++++++ .../moby/moby/client/client_options.go | 25 ++++++++++++++++++ .../moby/moby/client/client_responsehook.go | 23 ++++++++++++++++ .../moby/moby/client/container_attach.go | 2 +- .../moby/moby/client/container_exec.go | 8 +++--- .../moby/moby/client/container_list.go | 26 +++++++++++-------- .../moby/moby/client/container_resize.go | 4 +-- vendor/modules.txt | 2 +- 10 files changed, 80 insertions(+), 24 deletions(-) create mode 100644 vendor/github.com/moby/moby/client/client_responsehook.go diff --git a/vendor.mod b/vendor.mod index 1a5c333bf396..b80b01d22087 100644 --- a/vendor.mod +++ b/vendor.mod @@ -29,7 +29,7 @@ require ( github.com/mattn/go-runewidth v0.0.19 github.com/moby/go-archive v0.2.0 github.com/moby/moby/api v1.53.0 - github.com/moby/moby/client v0.2.2-rc.2 + github.com/moby/moby/client v0.2.2 github.com/moby/patternmatcher v0.6.0 github.com/moby/swarmkit/v2 v2.1.1 github.com/moby/sys/atomicwriter v0.1.0 diff --git a/vendor.sum b/vendor.sum index 7433aa04116f..075546cbe08f 100644 --- a/vendor.sum +++ b/vendor.sum @@ -115,8 +115,8 @@ github.com/moby/go-archive v0.2.0 h1:zg5QDUM2mi0JIM9fdQZWC7U8+2ZfixfTYoHL7rWUcP8 github.com/moby/go-archive v0.2.0/go.mod h1:mNeivT14o8xU+5q1YnNrkQVpK+dnNe/K6fHqnTg4qPU= github.com/moby/moby/api v1.53.0 h1:PihqG1ncw4W+8mZs69jlwGXdaYBeb5brF6BL7mPIS/w= github.com/moby/moby/api v1.53.0/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= -github.com/moby/moby/client v0.2.2-rc.2 h1:j8cmCofnlLCimDzFUYsrrACJZWsRiq0ZqGrbbVX2fFs= -github.com/moby/moby/client v0.2.2-rc.2/go.mod h1:LxIGylF1oOCPvokq90dMSUy44ODFFLkt2vRgDE1RKck= +github.com/moby/moby/client v0.2.2 h1:Pt4hRMCAIlyjL3cr8M5TrXCwKzguebPAc2do2ur7dEM= +github.com/moby/moby/client v0.2.2/go.mod h1:2EkIPVNCqR05CMIzL1mfA07t0HvVUUOl85pasRz/GmQ= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/swarmkit/v2 v2.1.1 h1:yvTJ8MMCc3f0qTA44J6R59EZ5yZawdYopkpuLk4+ICU= diff --git a/vendor/github.com/moby/moby/client/client.go b/vendor/github.com/moby/moby/client/client.go index 93d9f4f49a59..d8e69953d525 100644 --- a/vendor/github.com/moby/moby/client/client.go +++ b/vendor/github.com/moby/moby/client/client.go @@ -59,6 +59,7 @@ import ( "net/http" "net/url" "path" + "slices" "strings" "sync" "sync/atomic" @@ -241,6 +242,13 @@ func New(ops ...Opt) (*Client, error) { c.client.Transport = otelhttp.NewTransport(c.client.Transport, c.traceOpts...) + if len(cfg.responseHooks) > 0 { + c.client.Transport = &responseHookTransport{ + base: c.client.Transport, + hooks: slices.Clone(cfg.responseHooks), + } + } + return c, nil } diff --git a/vendor/github.com/moby/moby/client/client_options.go b/vendor/github.com/moby/moby/client/client_options.go index ae80c4e5cf01..d92a16a455f7 100644 --- a/vendor/github.com/moby/moby/client/client_options.go +++ b/vendor/github.com/moby/moby/client/client_options.go @@ -2,6 +2,7 @@ package client import ( "context" + "errors" "fmt" "net" "net/http" @@ -55,10 +56,19 @@ type clientConfig struct { // takes precedence. Either field disables API-version negotiation. envAPIVersion string + // responseHooks is a list of custom response hooks to call on responses. + responseHooks []ResponseHook + // traceOpts is a list of options to configure the tracing span. traceOpts []otelhttp.Option } +// ResponseHook is called for each HTTP response returned by the daemon. +// Hooks are invoked in the order they were added. +// +// Hooks must not read or close resp.Body. +type ResponseHook func(*http.Response) + // Opt is a configuration option to initialize a [Client]. type Opt func(*clientConfig) error @@ -348,3 +358,18 @@ func WithTraceOptions(opts ...otelhttp.Option) Opt { return nil } } + +// WithResponseHook adds a ResponseHook to the client. ResponseHooks are called +// for each HTTP response returned by the daemon. Hooks are invoked in the order +// they were added. +// +// Hooks must not read or close resp.Body. +func WithResponseHook(h ResponseHook) Opt { + return func(c *clientConfig) error { + if h == nil { + return errors.New("invalid response hook: hook is nil") + } + c.responseHooks = append(c.responseHooks, h) + return nil + } +} diff --git a/vendor/github.com/moby/moby/client/client_responsehook.go b/vendor/github.com/moby/moby/client/client_responsehook.go new file mode 100644 index 000000000000..7c93f111c783 --- /dev/null +++ b/vendor/github.com/moby/moby/client/client_responsehook.go @@ -0,0 +1,23 @@ +package client + +import ( + "net/http" +) + +type responseHookTransport struct { + base http.RoundTripper + hooks []ResponseHook +} + +func (t *responseHookTransport) RoundTrip(req *http.Request) (*http.Response, error) { + resp, err := t.base.RoundTrip(req) + if err != nil { + return resp, err + } + + for _, h := range t.hooks { + h(resp) + } + + return resp, nil +} diff --git a/vendor/github.com/moby/moby/client/container_attach.go b/vendor/github.com/moby/moby/client/container_attach.go index fa3a2efcc998..ce84122d32fc 100644 --- a/vendor/github.com/moby/moby/client/container_attach.go +++ b/vendor/github.com/moby/moby/client/container_attach.go @@ -23,7 +23,7 @@ type ContainerAttachResult struct { // ContainerAttach attaches a connection to a container in the server. // It returns a [HijackedResponse] with the hijacked connection -// and a reader to get output. It's up to the called to close +// and a reader to get output. It's up to the caller to close // the hijacked connection by calling [HijackedResponse.Close]. // // The stream format on the response uses one of two formats: diff --git a/vendor/github.com/moby/moby/client/container_exec.go b/vendor/github.com/moby/moby/client/container_exec.go index 953836423af3..30ed00ea52d7 100644 --- a/vendor/github.com/moby/moby/client/container_exec.go +++ b/vendor/github.com/moby/moby/client/container_exec.go @@ -82,8 +82,7 @@ type ExecStartOptions struct { } // ExecStartResult holds the result of starting a container exec. -type ExecStartResult struct { -} +type ExecStartResult struct{} // ExecStart starts an exec process already created in the docker host. func (cli *Client) ExecStart(ctx context.Context, execID string, options ExecStartOptions) (ExecStartResult, error) { @@ -118,7 +117,7 @@ type ExecAttachResult struct { // ExecAttach attaches a connection to an exec process in the server. // // It returns a [HijackedResponse] with the hijacked connection -// and a reader to get output. It's up to the called to close +// and a reader to get output. It's up to the caller to close // the hijacked connection by calling [HijackedResponse.Close]. // // The stream format on the response uses one of two formats: @@ -160,8 +159,7 @@ func getConsoleSize(hasTTY bool, consoleSize ConsoleSize) (*[2]uint, error) { } // ExecInspectOptions holds options for inspecting a container exec. -type ExecInspectOptions struct { -} +type ExecInspectOptions struct{} // ExecInspectResult holds the result of inspecting a container exec. // diff --git a/vendor/github.com/moby/moby/client/container_list.go b/vendor/github.com/moby/moby/client/container_list.go index fcd39c4da592..d9334c544e67 100644 --- a/vendor/github.com/moby/moby/client/container_list.go +++ b/vendor/github.com/moby/moby/client/container_list.go @@ -13,11 +13,23 @@ import ( type ContainerListOptions struct { Size bool All bool - Latest bool - Since string - Before string Limit int Filters Filters + + // Latest is non-functional and should not be used. Use Limit: 1 instead. + // + // Deprecated: the Latest option is non-functional and should not be used. Use Limit: 1 instead. + Latest bool + + // Since is no longer supported. Use the "since" filter instead. + // + // Deprecated: the Since option is no longer supported since docker 1.12 (API 1.24). Use the "since" filter instead. + Since string + + // Before is no longer supported. Use the "since" filter instead. + // + // Deprecated: the Before option is no longer supported since docker 1.12 (API 1.24). Use the "before" filter instead. + Before string } type ContainerListResult struct { @@ -36,14 +48,6 @@ func (cli *Client) ContainerList(ctx context.Context, options ContainerListOptio query.Set("limit", strconv.Itoa(options.Limit)) } - if options.Since != "" { - query.Set("since", options.Since) - } - - if options.Before != "" { - query.Set("before", options.Before) - } - if options.Size { query.Set("size", "1") } diff --git a/vendor/github.com/moby/moby/client/container_resize.go b/vendor/github.com/moby/moby/client/container_resize.go index 311a9dcf5a9f..8ce26fb5855e 100644 --- a/vendor/github.com/moby/moby/client/container_resize.go +++ b/vendor/github.com/moby/moby/client/container_resize.go @@ -42,8 +42,7 @@ func (cli *Client) ContainerResize(ctx context.Context, containerID string, opti type ExecResizeOptions ContainerResizeOptions // ExecResizeResult holds the result of resizing a container exec TTY. -type ExecResizeResult struct { -} +type ExecResizeResult struct{} // ExecResize changes the size of the tty for an exec process running inside a container. func (cli *Client) ExecResize(ctx context.Context, execID string, options ExecResizeOptions) (ExecResizeResult, error) { @@ -62,5 +61,4 @@ func (cli *Client) ExecResize(ctx context.Context, execID string, options ExecRe return ExecResizeResult{}, err } return ExecResizeResult{}, nil - } diff --git a/vendor/modules.txt b/vendor/modules.txt index c2880d8d7314..8bc359ef3aef 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -189,7 +189,7 @@ github.com/moby/moby/api/types/storage github.com/moby/moby/api/types/swarm github.com/moby/moby/api/types/system github.com/moby/moby/api/types/volume -# github.com/moby/moby/client v0.2.2-rc.2 +# github.com/moby/moby/client v0.2.2 ## explicit; go 1.24.0 github.com/moby/moby/client github.com/moby/moby/client/internal