From 886ab250f033477ba101771df6110dcee71c2d22 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 1 Oct 2026 22:23:55 +0200 Subject: [PATCH] vendor: github.com/moby/moby/client v0.6.1, moby/api v1.56.1 Signed-off-by: Sebastiaan van Stijn --- vendor.mod | 4 +- vendor.sum | 8 +-- .../moby/api/pkg/authconfig/authconfig.go | 2 +- .../moby/moby/api/types/build/disk_usage.go | 3 - .../moby/api/types/common/error_response.go | 3 - .../moby/moby/api/types/common/id_response.go | 3 - .../moby/api/types/container/change_type.go | 3 - .../api/types/container/create_response.go | 3 - .../moby/api/types/container/disk_usage.go | 3 - .../api/types/container/filesystem_change.go | 3 - .../moby/api/types/container/port_summary.go | 3 - .../moby/api/types/container/top_response.go | 3 - .../api/types/container/update_response.go | 3 - .../api/types/container/wait_exit_error.go | 3 - .../moby/api/types/container/wait_response.go | 3 - .../moby/api/types/image/delete_response.go | 3 - .../moby/moby/api/types/image/disk_usage.go | 3 - .../api/types/image/history_response_item.go | 3 - .../api/types/network/config_reference.go | 3 - .../moby/api/types/network/connect_request.go | 3 - .../moby/api/types/network/create_response.go | 3 - .../api/types/network/disconnect_request.go | 3 - .../api/types/network/endpoint_resource.go | 3 - .../moby/moby/api/types/network/inspect.go | 3 - .../moby/api/types/network/ipam_status.go | 3 - .../moby/moby/api/types/network/network.go | 3 - .../moby/moby/api/types/network/peer_info.go | 3 - .../moby/api/types/network/service_info.go | 3 - .../moby/moby/api/types/network/status.go | 3 - .../moby/api/types/network/subnet_status.go | 3 - .../moby/moby/api/types/network/summary.go | 3 - .../moby/moby/api/types/network/task.go | 3 - .../moby/moby/api/types/plugin/device.go | 3 - .../moby/moby/api/types/plugin/env.go | 3 - .../moby/moby/api/types/plugin/mount.go | 3 - .../moby/moby/api/types/plugin/plugin.go | 3 - .../moby/api/types/registry/auth_response.go | 3 - .../moby/api/types/storage/driver_data.go | 3 - .../api/types/storage/root_f_s_storage.go | 3 - .../storage/root_f_s_storage_snapshot.go | 3 - .../moby/moby/api/types/storage/storage.go | 3 - .../types/swarm/service_create_response.go | 3 - .../types/swarm/service_update_response.go | 3 - .../moby/api/types/volume/create_request.go | 3 - .../moby/moby/api/types/volume/disk_usage.go | 3 - .../moby/api/types/volume/list_response.go | 3 - .../moby/moby/api/types/volume/volume.go | 3 - vendor/github.com/moby/moby/client/client.go | 10 +-- .../moby/moby/client/client_hook.go | 70 +++++++++++++++++++ .../moby/moby/client/client_options.go | 38 +++++++++- .../moby/moby/client/client_responsehook.go | 23 ------ .../moby/moby/client/container_attach.go | 5 +- .../moby/moby/client/container_exec.go | 6 +- vendor/github.com/moby/moby/client/hijack.go | 24 +++++-- .../moby/moby/client/plugin_create.go | 4 +- vendor/modules.txt | 4 +- 56 files changed, 142 insertions(+), 188 deletions(-) create mode 100644 vendor/github.com/moby/moby/client/client_hook.go delete mode 100644 vendor/github.com/moby/moby/client/client_responsehook.go diff --git a/vendor.mod b/vendor.mod index b154d33338cc..166423b46c4b 100644 --- a/vendor.mod +++ b/vendor.mod @@ -33,8 +33,8 @@ require ( github.com/google/uuid v1.6.0 github.com/mattn/go-runewidth v0.0.29 github.com/moby/go-archive v0.3.3 - github.com/moby/moby/api v1.56.0 - github.com/moby/moby/client v0.6.0 + github.com/moby/moby/api v1.56.1 + github.com/moby/moby/client v0.6.1 github.com/moby/patternmatcher v0.6.1 github.com/moby/swarmkit/v2 v2.1.2 github.com/moby/sys/atomicwriter v0.1.0 diff --git a/vendor.sum b/vendor.sum index b39e868e6450..0a584f447934 100644 --- a/vendor.sum +++ b/vendor.sum @@ -88,10 +88,10 @@ 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.3.3 h1:OxxR9paxsluYi+zDUEXTTaIxtkK3viymW+Ka7vRhhME= github.com/moby/go-archive v0.3.3/go.mod h1:Npdv43fFqlhZW7Xo8fbm3ZMYFvAGNviUPqX21VERbcE= -github.com/moby/moby/api v1.56.0 h1:GQzua3NA599ASSIICx0iFgiJeO9YkdDARvQsm23ZZuQ= -github.com/moby/moby/api v1.56.0/go.mod h1:sZ+THbVWkjOmBPPfbnzdD/G1LuIexWhqlSHHPTDQ1Uk= -github.com/moby/moby/client v0.6.0 h1:AJjEB21QPbXSXjDsZorFBoDZPhMrfbpaPLgSMAW9Bgs= -github.com/moby/moby/client v0.6.0/go.mod h1:OCo00wNRyA3m4lmJ228W3JbyCN4ZNNYjpOXiJydBdcQ= +github.com/moby/moby/api v1.56.1 h1:PpWkvVPB7Fr/No8w+TfyJ/I6rWZ2YPZhT3JorIg+06c= +github.com/moby/moby/api v1.56.1/go.mod h1:sZ+THbVWkjOmBPPfbnzdD/G1LuIexWhqlSHHPTDQ1Uk= +github.com/moby/moby/client v0.6.1 h1:gvfKmdcWw+9MzXYP0vAUKQtBTGu1L8475K2nsmL7O98= +github.com/moby/moby/client v0.6.1/go.mod h1:XHgTFqz9NCgS/VuoxXMmEDVmVgXQ4vFEc15wsCIwb24= github.com/moby/patternmatcher v0.6.1 h1:qlhtafmr6kgMIJjKJMDmMWq7WLkKIo23hsrpR3x084U= github.com/moby/patternmatcher v0.6.1/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/swarmkit/v2 v2.1.2 h1:1WDZAI6HVYNKdCG4zlXnTAPyLsLwuhRGWlHoOUf5Z6I= 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 d1b0105a6894..9e9686878cfc 100644 --- a/vendor/github.com/moby/moby/api/pkg/authconfig/authconfig.go +++ b/vendor/github.com/moby/moby/api/pkg/authconfig/authconfig.go @@ -21,7 +21,7 @@ func Encode(authConfig registry.AuthConfig) (string, error) { // // FIXME(thaJeztah): find exactly what code-paths are impacted by this. // if authConfig == (AuthConfig{}) { return "", nil } - buf, err := json.Marshal(authConfig) + buf, err := json.Marshal(authConfig) // #nosec G117 -- intentionally marshaling auth. if err != nil { return "", errInvalidParameter{err} } diff --git a/vendor/github.com/moby/moby/api/types/build/disk_usage.go b/vendor/github.com/moby/moby/api/types/build/disk_usage.go index 3613797dba7e..bf178f81e61a 100644 --- a/vendor/github.com/moby/moby/api/types/build/disk_usage.go +++ b/vendor/github.com/moby/moby/api/types/build/disk_usage.go @@ -2,9 +2,6 @@ package build -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // DiskUsage represents system data usage for build cache resources. // // swagger:model DiskUsage diff --git a/vendor/github.com/moby/moby/api/types/common/error_response.go b/vendor/github.com/moby/moby/api/types/common/error_response.go index b49d3eea0a25..9c7f2fdc2d1b 100644 --- a/vendor/github.com/moby/moby/api/types/common/error_response.go +++ b/vendor/github.com/moby/moby/api/types/common/error_response.go @@ -2,9 +2,6 @@ package common -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // ErrorResponse Represents an error. // Example: {"message":"Something went wrong."} // diff --git a/vendor/github.com/moby/moby/api/types/common/id_response.go b/vendor/github.com/moby/moby/api/types/common/id_response.go index 7dfe4bf12b55..546f5e8d1fe8 100644 --- a/vendor/github.com/moby/moby/api/types/common/id_response.go +++ b/vendor/github.com/moby/moby/api/types/common/id_response.go @@ -2,9 +2,6 @@ package common -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // IDResponse Response to an API call that returns just an Id // // swagger:model IDResponse diff --git a/vendor/github.com/moby/moby/api/types/container/change_type.go b/vendor/github.com/moby/moby/api/types/container/change_type.go index 52fc99235b1e..1f2ac105f709 100644 --- a/vendor/github.com/moby/moby/api/types/container/change_type.go +++ b/vendor/github.com/moby/moby/api/types/container/change_type.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // ChangeType Kind of change // // Can be one of: diff --git a/vendor/github.com/moby/moby/api/types/container/create_response.go b/vendor/github.com/moby/moby/api/types/container/create_response.go index 39d761aa968c..9fc92fb6fe90 100644 --- a/vendor/github.com/moby/moby/api/types/container/create_response.go +++ b/vendor/github.com/moby/moby/api/types/container/create_response.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // CreateResponse ContainerCreateResponse // // # OK response to ContainerCreate operation diff --git a/vendor/github.com/moby/moby/api/types/container/disk_usage.go b/vendor/github.com/moby/moby/api/types/container/disk_usage.go index c36721d3b00f..0c0a772d629b 100644 --- a/vendor/github.com/moby/moby/api/types/container/disk_usage.go +++ b/vendor/github.com/moby/moby/api/types/container/disk_usage.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // DiskUsage represents system data usage information for container resources. // // swagger:model DiskUsage diff --git a/vendor/github.com/moby/moby/api/types/container/filesystem_change.go b/vendor/github.com/moby/moby/api/types/container/filesystem_change.go index b9ec83e52190..d8950952591a 100644 --- a/vendor/github.com/moby/moby/api/types/container/filesystem_change.go +++ b/vendor/github.com/moby/moby/api/types/container/filesystem_change.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // FilesystemChange Change in the container's filesystem. // // swagger:model FilesystemChange diff --git a/vendor/github.com/moby/moby/api/types/container/port_summary.go b/vendor/github.com/moby/moby/api/types/container/port_summary.go index 68148eece462..0cb7455f3643 100644 --- a/vendor/github.com/moby/moby/api/types/container/port_summary.go +++ b/vendor/github.com/moby/moby/api/types/container/port_summary.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - import ( "net/netip" ) diff --git a/vendor/github.com/moby/moby/api/types/container/top_response.go b/vendor/github.com/moby/moby/api/types/container/top_response.go index 966603617f11..50124e8a7652 100644 --- a/vendor/github.com/moby/moby/api/types/container/top_response.go +++ b/vendor/github.com/moby/moby/api/types/container/top_response.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // TopResponse ContainerTopResponse // // Container "top" response. diff --git a/vendor/github.com/moby/moby/api/types/container/update_response.go b/vendor/github.com/moby/moby/api/types/container/update_response.go index 2f7263b14119..94e5eccb204c 100644 --- a/vendor/github.com/moby/moby/api/types/container/update_response.go +++ b/vendor/github.com/moby/moby/api/types/container/update_response.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // UpdateResponse ContainerUpdateResponse // // Response for a successful container-update. diff --git a/vendor/github.com/moby/moby/api/types/container/wait_exit_error.go b/vendor/github.com/moby/moby/api/types/container/wait_exit_error.go index 96a7770c34a7..50f353f95ed3 100644 --- a/vendor/github.com/moby/moby/api/types/container/wait_exit_error.go +++ b/vendor/github.com/moby/moby/api/types/container/wait_exit_error.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // WaitExitError container waiting error, if any // // swagger:model WaitExitError diff --git a/vendor/github.com/moby/moby/api/types/container/wait_response.go b/vendor/github.com/moby/moby/api/types/container/wait_response.go index 68d3c3872421..ff9281dd91a7 100644 --- a/vendor/github.com/moby/moby/api/types/container/wait_response.go +++ b/vendor/github.com/moby/moby/api/types/container/wait_response.go @@ -2,9 +2,6 @@ package container -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // WaitResponse ContainerWaitResponse // // # OK response to ContainerWait operation diff --git a/vendor/github.com/moby/moby/api/types/image/delete_response.go b/vendor/github.com/moby/moby/api/types/image/delete_response.go index b19119a381e6..c0a0a5af3db5 100644 --- a/vendor/github.com/moby/moby/api/types/image/delete_response.go +++ b/vendor/github.com/moby/moby/api/types/image/delete_response.go @@ -2,9 +2,6 @@ package image -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // DeleteResponse delete response // // swagger:model DeleteResponse diff --git a/vendor/github.com/moby/moby/api/types/image/disk_usage.go b/vendor/github.com/moby/moby/api/types/image/disk_usage.go index 7297813c1d59..bbe2d57672c8 100644 --- a/vendor/github.com/moby/moby/api/types/image/disk_usage.go +++ b/vendor/github.com/moby/moby/api/types/image/disk_usage.go @@ -2,9 +2,6 @@ package image -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // DiskUsage represents system data usage for image resources. // // swagger:model DiskUsage diff --git a/vendor/github.com/moby/moby/api/types/image/history_response_item.go b/vendor/github.com/moby/moby/api/types/image/history_response_item.go index 3de3181ab95a..c7b1eddcd9a1 100644 --- a/vendor/github.com/moby/moby/api/types/image/history_response_item.go +++ b/vendor/github.com/moby/moby/api/types/image/history_response_item.go @@ -2,9 +2,6 @@ package image -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // HistoryResponseItem HistoryResponseItem // // individual image layer information in response to ImageHistory operation diff --git a/vendor/github.com/moby/moby/api/types/network/config_reference.go b/vendor/github.com/moby/moby/api/types/network/config_reference.go index 1158afe655ed..0c940a9e7401 100644 --- a/vendor/github.com/moby/moby/api/types/network/config_reference.go +++ b/vendor/github.com/moby/moby/api/types/network/config_reference.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // ConfigReference The config-only network source to provide the configuration for // this network. // diff --git a/vendor/github.com/moby/moby/api/types/network/connect_request.go b/vendor/github.com/moby/moby/api/types/network/connect_request.go index 2ff14d360301..68fbf168445f 100644 --- a/vendor/github.com/moby/moby/api/types/network/connect_request.go +++ b/vendor/github.com/moby/moby/api/types/network/connect_request.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // ConnectRequest NetworkConnectRequest represents the data to be used to connect a container to a network. // // swagger:model ConnectRequest diff --git a/vendor/github.com/moby/moby/api/types/network/create_response.go b/vendor/github.com/moby/moby/api/types/network/create_response.go index 199705991297..429b278e4833 100644 --- a/vendor/github.com/moby/moby/api/types/network/create_response.go +++ b/vendor/github.com/moby/moby/api/types/network/create_response.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // CreateResponse NetworkCreateResponse // // # OK response to NetworkCreate operation diff --git a/vendor/github.com/moby/moby/api/types/network/disconnect_request.go b/vendor/github.com/moby/moby/api/types/network/disconnect_request.go index 7b1f521e775b..aeebee70a9db 100644 --- a/vendor/github.com/moby/moby/api/types/network/disconnect_request.go +++ b/vendor/github.com/moby/moby/api/types/network/disconnect_request.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // DisconnectRequest NetworkDisconnectRequest represents the data to be used to disconnect a container from a network. // // swagger:model DisconnectRequest diff --git a/vendor/github.com/moby/moby/api/types/network/endpoint_resource.go b/vendor/github.com/moby/moby/api/types/network/endpoint_resource.go index bf493ad5ddcd..a9ab27ae3c08 100644 --- a/vendor/github.com/moby/moby/api/types/network/endpoint_resource.go +++ b/vendor/github.com/moby/moby/api/types/network/endpoint_resource.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - import ( "net/netip" ) diff --git a/vendor/github.com/moby/moby/api/types/network/inspect.go b/vendor/github.com/moby/moby/api/types/network/inspect.go index cded5e6081df..c07026ac40a0 100644 --- a/vendor/github.com/moby/moby/api/types/network/inspect.go +++ b/vendor/github.com/moby/moby/api/types/network/inspect.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Inspect The body of the "get network" http response message. // // swagger:model Inspect diff --git a/vendor/github.com/moby/moby/api/types/network/ipam_status.go b/vendor/github.com/moby/moby/api/types/network/ipam_status.go index 7eb4e8487e95..50e410ff8fcc 100644 --- a/vendor/github.com/moby/moby/api/types/network/ipam_status.go +++ b/vendor/github.com/moby/moby/api/types/network/ipam_status.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // IPAMStatus IPAM status // // swagger:model IPAMStatus diff --git a/vendor/github.com/moby/moby/api/types/network/network.go b/vendor/github.com/moby/moby/api/types/network/network.go index a7d9c0f6ad5a..b2d4d43cd2f5 100644 --- a/vendor/github.com/moby/moby/api/types/network/network.go +++ b/vendor/github.com/moby/moby/api/types/network/network.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - import ( timeext "time" ) diff --git a/vendor/github.com/moby/moby/api/types/network/peer_info.go b/vendor/github.com/moby/moby/api/types/network/peer_info.go index dc88ec16fa9b..8638e61623c6 100644 --- a/vendor/github.com/moby/moby/api/types/network/peer_info.go +++ b/vendor/github.com/moby/moby/api/types/network/peer_info.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - import ( "net/netip" ) diff --git a/vendor/github.com/moby/moby/api/types/network/service_info.go b/vendor/github.com/moby/moby/api/types/network/service_info.go index fdd92f161151..abb3619533ff 100644 --- a/vendor/github.com/moby/moby/api/types/network/service_info.go +++ b/vendor/github.com/moby/moby/api/types/network/service_info.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - import ( "net/netip" ) diff --git a/vendor/github.com/moby/moby/api/types/network/status.go b/vendor/github.com/moby/moby/api/types/network/status.go index 94f4b4b2ec84..b90f1bf1e8f4 100644 --- a/vendor/github.com/moby/moby/api/types/network/status.go +++ b/vendor/github.com/moby/moby/api/types/network/status.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Status provides runtime information about the network such as the number of allocated IPs. // // swagger:model Status diff --git a/vendor/github.com/moby/moby/api/types/network/subnet_status.go b/vendor/github.com/moby/moby/api/types/network/subnet_status.go index dd62429f5f83..de74c7a2e6fd 100644 --- a/vendor/github.com/moby/moby/api/types/network/subnet_status.go +++ b/vendor/github.com/moby/moby/api/types/network/subnet_status.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // SubnetStatus subnet status // // swagger:model SubnetStatus diff --git a/vendor/github.com/moby/moby/api/types/network/summary.go b/vendor/github.com/moby/moby/api/types/network/summary.go index 3f50ce22786a..50c346ffa5c8 100644 --- a/vendor/github.com/moby/moby/api/types/network/summary.go +++ b/vendor/github.com/moby/moby/api/types/network/summary.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Summary Network list response item // // swagger:model Summary diff --git a/vendor/github.com/moby/moby/api/types/network/task.go b/vendor/github.com/moby/moby/api/types/network/task.go index a547523a44ea..c0eac2322ef7 100644 --- a/vendor/github.com/moby/moby/api/types/network/task.go +++ b/vendor/github.com/moby/moby/api/types/network/task.go @@ -2,9 +2,6 @@ package network -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - import ( "net/netip" ) diff --git a/vendor/github.com/moby/moby/api/types/plugin/device.go b/vendor/github.com/moby/moby/api/types/plugin/device.go index ae961770474e..2044e4b99aba 100644 --- a/vendor/github.com/moby/moby/api/types/plugin/device.go +++ b/vendor/github.com/moby/moby/api/types/plugin/device.go @@ -2,9 +2,6 @@ package plugin -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Device device // // swagger:model Device diff --git a/vendor/github.com/moby/moby/api/types/plugin/env.go b/vendor/github.com/moby/moby/api/types/plugin/env.go index dcbe0b762d79..99ee46dabfca 100644 --- a/vendor/github.com/moby/moby/api/types/plugin/env.go +++ b/vendor/github.com/moby/moby/api/types/plugin/env.go @@ -2,9 +2,6 @@ package plugin -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Env env // // swagger:model Env diff --git a/vendor/github.com/moby/moby/api/types/plugin/mount.go b/vendor/github.com/moby/moby/api/types/plugin/mount.go index 7970306cc85b..9426a94c571b 100644 --- a/vendor/github.com/moby/moby/api/types/plugin/mount.go +++ b/vendor/github.com/moby/moby/api/types/plugin/mount.go @@ -2,9 +2,6 @@ package plugin -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Mount mount // // swagger:model Mount diff --git a/vendor/github.com/moby/moby/api/types/plugin/plugin.go b/vendor/github.com/moby/moby/api/types/plugin/plugin.go index 3305170d5eec..2dcf83be2590 100644 --- a/vendor/github.com/moby/moby/api/types/plugin/plugin.go +++ b/vendor/github.com/moby/moby/api/types/plugin/plugin.go @@ -2,9 +2,6 @@ package plugin -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Plugin A plugin for the Engine API // // swagger:model Plugin diff --git a/vendor/github.com/moby/moby/api/types/registry/auth_response.go b/vendor/github.com/moby/moby/api/types/registry/auth_response.go index 94c2e1bb36a9..c7057d860618 100644 --- a/vendor/github.com/moby/moby/api/types/registry/auth_response.go +++ b/vendor/github.com/moby/moby/api/types/registry/auth_response.go @@ -2,9 +2,6 @@ package registry -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // AuthResponse An identity token was generated successfully. // // swagger:model AuthResponse diff --git a/vendor/github.com/moby/moby/api/types/storage/driver_data.go b/vendor/github.com/moby/moby/api/types/storage/driver_data.go index 65d5b4c20ea0..5e6cb22ab50e 100644 --- a/vendor/github.com/moby/moby/api/types/storage/driver_data.go +++ b/vendor/github.com/moby/moby/api/types/storage/driver_data.go @@ -2,9 +2,6 @@ package storage -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // DriverData Information about the storage driver used to store the container's and // image's filesystem. // diff --git a/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go b/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go index d82f2b6bcbc2..ecf63ea0ccd3 100644 --- a/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go +++ b/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go @@ -2,9 +2,6 @@ package storage -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // RootFSStorage Information about the storage used for the container's root filesystem. // // swagger:model RootFSStorage diff --git a/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go b/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go index dd2b82d245f6..c040636da8d0 100644 --- a/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go +++ b/vendor/github.com/moby/moby/api/types/storage/root_f_s_storage_snapshot.go @@ -2,9 +2,6 @@ package storage -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // RootFSStorageSnapshot Information about a snapshot backend of the container's root filesystem. // // swagger:model RootFSStorageSnapshot diff --git a/vendor/github.com/moby/moby/api/types/storage/storage.go b/vendor/github.com/moby/moby/api/types/storage/storage.go index 77843db97089..4cf31c54b594 100644 --- a/vendor/github.com/moby/moby/api/types/storage/storage.go +++ b/vendor/github.com/moby/moby/api/types/storage/storage.go @@ -2,9 +2,6 @@ package storage -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Storage Information about the storage used by the container. // // swagger:model Storage diff --git a/vendor/github.com/moby/moby/api/types/swarm/service_create_response.go b/vendor/github.com/moby/moby/api/types/swarm/service_create_response.go index ebbc097d90db..2dcc49c90362 100644 --- a/vendor/github.com/moby/moby/api/types/swarm/service_create_response.go +++ b/vendor/github.com/moby/moby/api/types/swarm/service_create_response.go @@ -2,9 +2,6 @@ package swarm -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // ServiceCreateResponse contains the information returned to a client on the // creation of a new service. // diff --git a/vendor/github.com/moby/moby/api/types/swarm/service_update_response.go b/vendor/github.com/moby/moby/api/types/swarm/service_update_response.go index b7649096a07a..be5d44c4cf67 100644 --- a/vendor/github.com/moby/moby/api/types/swarm/service_update_response.go +++ b/vendor/github.com/moby/moby/api/types/swarm/service_update_response.go @@ -2,9 +2,6 @@ package swarm -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // ServiceUpdateResponse service update response // Example: {"Warnings":["unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"]} // diff --git a/vendor/github.com/moby/moby/api/types/volume/create_request.go b/vendor/github.com/moby/moby/api/types/volume/create_request.go index 3217df827095..17c5f8678454 100644 --- a/vendor/github.com/moby/moby/api/types/volume/create_request.go +++ b/vendor/github.com/moby/moby/api/types/volume/create_request.go @@ -2,9 +2,6 @@ package volume -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // CreateRequest VolumeConfig // // # Volume configuration diff --git a/vendor/github.com/moby/moby/api/types/volume/disk_usage.go b/vendor/github.com/moby/moby/api/types/volume/disk_usage.go index e2afbac6591e..cbf740e33cfd 100644 --- a/vendor/github.com/moby/moby/api/types/volume/disk_usage.go +++ b/vendor/github.com/moby/moby/api/types/volume/disk_usage.go @@ -2,9 +2,6 @@ package volume -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // DiskUsage represents system data usage for volume resources. // // swagger:model DiskUsage diff --git a/vendor/github.com/moby/moby/api/types/volume/list_response.go b/vendor/github.com/moby/moby/api/types/volume/list_response.go index f257762f09d7..02dc415a5f44 100644 --- a/vendor/github.com/moby/moby/api/types/volume/list_response.go +++ b/vendor/github.com/moby/moby/api/types/volume/list_response.go @@ -2,9 +2,6 @@ package volume -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // ListResponse VolumeListResponse // // # Volume list response diff --git a/vendor/github.com/moby/moby/api/types/volume/volume.go b/vendor/github.com/moby/moby/api/types/volume/volume.go index 524ebfb8ac69..a3d6d828644f 100644 --- a/vendor/github.com/moby/moby/api/types/volume/volume.go +++ b/vendor/github.com/moby/moby/api/types/volume/volume.go @@ -2,9 +2,6 @@ package volume -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - // Volume volume // // swagger:model Volume diff --git a/vendor/github.com/moby/moby/client/client.go b/vendor/github.com/moby/moby/client/client.go index 3dbcacdeb9d4..f407505e013a 100644 --- a/vendor/github.com/moby/moby/client/client.go +++ b/vendor/github.com/moby/moby/client/client.go @@ -60,7 +60,6 @@ import ( "net/url" "path" "runtime" - "slices" "strings" "sync" "sync/atomic" @@ -250,10 +249,11 @@ 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), + if len(cfg.requestHooks) > 0 || len(cfg.responseHooks) > 0 { + c.client.Transport = &hookTransport{ + base: c.client.Transport, + reqHooks: cfg.requestHooks, + respHooks: cfg.responseHooks, } } diff --git a/vendor/github.com/moby/moby/client/client_hook.go b/vendor/github.com/moby/moby/client/client_hook.go new file mode 100644 index 000000000000..c9afa34ddd5c --- /dev/null +++ b/vendor/github.com/moby/moby/client/client_hook.go @@ -0,0 +1,70 @@ +package client + +import ( + "errors" + "io" + "net/http" +) + +type hookTransport struct { + base http.RoundTripper + reqHooks []RequestHook + respHooks []ResponseHook +} + +func (t *hookTransport) RoundTrip(req *http.Request) (*http.Response, error) { + if len(t.reqHooks) > 0 { + hookReq := req.Clone(req.Context()) + + if hookReq.Body != nil { + hookReq.Body = hookBody{} + } + if hookReq.GetBody != nil { + hookReq.GetBody = func() (io.ReadCloser, error) { + return hookBody{}, nil + } + } + + for _, h := range t.reqHooks { + if err := h(hookReq); err != nil { + // The base transport never takes ownership, so close the original + // request body before returning the hook error. + if req.Body != nil { + _ = req.Body.Close() + } + return nil, err + } + } + // Restore the actual request body after the hooks have run. The + // modified request metadata is preserved on hookReq. + hookReq.Body = req.Body + hookReq.GetBody = req.GetBody + req = hookReq + } + + resp, err := t.base.RoundTrip(req) + if err != nil { + return resp, err + } + + if len(t.respHooks) > 0 { + hookResp := *resp + if hookResp.Body != nil { + hookResp.Body = hookBody{} + } + + for _, h := range t.respHooks { + h(&hookResp) + } + } + + return resp, nil +} + +type hookBody struct{} + +func (hookBody) Read([]byte) (int, error) { + return 0, errors.New("hooks must not read HTTP message body") +} + +func (hookBody) Close() error { return nil } diff --git a/vendor/github.com/moby/moby/client/client_options.go b/vendor/github.com/moby/moby/client/client_options.go index 3992557230c3..3499172c4d07 100644 --- a/vendor/github.com/moby/moby/client/client_options.go +++ b/vendor/github.com/moby/moby/client/client_options.go @@ -58,13 +58,23 @@ 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. + // requestHooks contains hooks to call before requests are made. + requestHooks []RequestHook + // responseHooks contains hooks to call on responses. responseHooks []ResponseHook // traceOpts is a list of options to configure the tracing span. traceOpts []otelhttp.Option } +// RequestHook is called for each HTTP request made by the client. +// Hooks are invoked in the order they were added. +// +// Hooks may inspect the request and modify request metadata, such as headers, +// before the request is sent. The request body cannot be read or closed by +// the hook. +type RequestHook func(*http.Request) error + // ResponseHook is called for each HTTP response returned by the daemon. // Hooks are invoked in the order they were added. // @@ -411,12 +421,25 @@ func WithTraceOptions(opts ...otelhttp.Option) Opt { } } -// WithResponseHook adds a ResponseHook to the client. ResponseHooks are called +// WithHTTPRequestHook adds a [RequestHook] to the client. RequestHooks are called +// before an HTTP request is made to the daemon. Hooks are invoked in the order +// they were added. +func WithHTTPRequestHook(h RequestHook) Opt { + return func(c *clientConfig) error { + if h == nil { + return errors.New("invalid request hook: hook is nil") + } + c.requestHooks = append(c.requestHooks, h) + return nil + } +} + +// WithHTTPResponseHook 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 { +func WithHTTPResponseHook(h ResponseHook) Opt { return func(c *clientConfig) error { if h == nil { return errors.New("invalid response hook: hook is nil") @@ -425,3 +448,12 @@ func WithResponseHook(h ResponseHook) Opt { return nil } } + +// WithResponseHook is equivalent to [WithHTTPResponseHook]. +// +// Deprecated: use [WithHTTPResponseHook] instead. +// +//go:fix inline +func WithResponseHook(h ResponseHook) Opt { + return WithHTTPResponseHook(h) +} diff --git a/vendor/github.com/moby/moby/client/client_responsehook.go b/vendor/github.com/moby/moby/client/client_responsehook.go deleted file mode 100644 index 7c93f111c783..000000000000 --- a/vendor/github.com/moby/moby/client/client_responsehook.go +++ /dev/null @@ -1,23 +0,0 @@ -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 ce84122d32fc..9619e812b204 100644 --- a/vendor/github.com/moby/moby/client/container_attach.go +++ b/vendor/github.com/moby/moby/client/container_attach.go @@ -75,9 +75,8 @@ func (cli *Client) ContainerAttach(ctx context.Context, containerID string, opti query.Set("logs", "1") } - hijacked, err := cli.postHijacked(ctx, "/containers/"+containerID+"/attach", query, nil, http.Header{ - "Content-Type": {"text/plain"}, - }) + headers := http.Header{"Content-Type": {"text/plain"}} + hijacked, err := cli.postHijacked(ctx, "/containers/"+containerID+"/attach", query, headers, nil) if err != nil { return ContainerAttachResult{}, err } diff --git a/vendor/github.com/moby/moby/client/container_exec.go b/vendor/github.com/moby/moby/client/container_exec.go index 86c9474b48cc..d831521842d3 100644 --- a/vendor/github.com/moby/moby/client/container_exec.go +++ b/vendor/github.com/moby/moby/client/container_exec.go @@ -134,13 +134,11 @@ func (cli *Client) ExecAttach(ctx context.Context, execID string, options ExecAt if err != nil { return ExecAttachResult{}, err } - req := container.ExecStartRequest{ + headers := http.Header{"Content-Type": {"application/json"}} + response, err := cli.postHijacked(ctx, "/exec/"+execID+"/start", nil, headers, container.ExecStartRequest{ Detach: false, Tty: options.TTY, ConsoleSize: consoleSize, - } - response, err := cli.postHijacked(ctx, "/exec/"+execID+"/start", nil, req, http.Header{ - "Content-Type": {"application/json"}, }) return ExecAttachResult{HijackedResponse: response}, err } diff --git a/vendor/github.com/moby/moby/client/hijack.go b/vendor/github.com/moby/moby/client/hijack.go index 3b6b12c8fd14..fb3a2326081b 100644 --- a/vendor/github.com/moby/moby/client/hijack.go +++ b/vendor/github.com/moby/moby/client/hijack.go @@ -13,7 +13,7 @@ import ( ) // postHijacked sends a POST request and hijacks the connection. -func (cli *Client) postHijacked(ctx context.Context, path string, query url.Values, body any, headers map[string][]string) (HijackedResponse, error) { +func (cli *Client) postHijacked(ctx context.Context, path string, query url.Values, headers map[string][]string, body any) (HijackedResponse, error) { jsonBody, err := jsonEncode(body) if err != nil { return HijackedResponse{}, err @@ -22,7 +22,7 @@ func (cli *Client) postHijacked(ctx context.Context, path string, query url.Valu if err != nil { return HijackedResponse{}, err } - conn, mediaType, err := setupHijackConn(cli.dialer(), req, "tcp") + conn, mediaType, err := cli.setupHijackConn(req, "tcp") if err != nil { return HijackedResponse{}, err } @@ -38,16 +38,17 @@ func (cli *Client) DialHijack(ctx context.Context, url, proto string, meta map[s } req = cli.addHeaders(req, meta) - conn, _, err := setupHijackConn(cli.Dialer(), req, proto) + conn, _, err := cli.setupHijackConn(req, proto) return conn, err } -func setupHijackConn(dialer func(context.Context) (net.Conn, error), req *http.Request, proto string) (_ net.Conn, _ string, retErr error) { +func (cli *Client) setupHijackConn(req *http.Request, proto string) (_ net.Conn, _ string, retErr error) { ctx := req.Context() req.Header.Set("Connection", "Upgrade") req.Header.Set("Upgrade", proto) - conn, err := dialer(ctx) + dial := cli.dialer() + conn, err := dial(ctx) if err != nil { return nil, "", fmt.Errorf("cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: %w", err) } @@ -69,8 +70,19 @@ func setupHijackConn(dialer func(context.Context) (net.Conn, error), req *http.R hc := &hijackedConn{conn, bufio.NewReader(conn)} + cfg := &cli.clientConfig + + var rt http.RoundTripper = otelhttp.NewTransport(hc, cli.traceOpts...) + if len(cfg.requestHooks) > 0 || len(cfg.responseHooks) > 0 { + rt = &hookTransport{ + base: rt, + reqHooks: cfg.requestHooks, + respHooks: cfg.responseHooks, + } + } + // Server hijacks the connection, error 'connection closed' expected - resp, err := otelhttp.NewTransport(hc).RoundTrip(req) + resp, err := rt.RoundTrip(req) if err != nil { return nil, "", err } diff --git a/vendor/github.com/moby/moby/client/plugin_create.go b/vendor/github.com/moby/moby/client/plugin_create.go index f4e7c9a02fa3..774b9e36b5d1 100644 --- a/vendor/github.com/moby/moby/client/plugin_create.go +++ b/vendor/github.com/moby/moby/client/plugin_create.go @@ -19,12 +19,10 @@ type PluginCreateResult struct { // PluginCreate creates a plugin func (cli *Client) PluginCreate(ctx context.Context, createContext io.Reader, createOptions PluginCreateOptions) (PluginCreateResult, error) { - headers := http.Header(make(map[string][]string)) - headers.Set("Content-Type", "application/x-tar") - query := url.Values{} query.Set("name", createOptions.RepoName) + headers := http.Header{"Content-Type": {"application/x-tar"}} resp, err := cli.postRaw(ctx, "/plugins/create", query, headers, createContext) defer ensureReaderClosed(resp) return PluginCreateResult{}, err diff --git a/vendor/modules.txt b/vendor/modules.txt index 982b0e9e7847..b9349f3d10db 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -167,7 +167,7 @@ github.com/moby/go-archive github.com/moby/go-archive/compression github.com/moby/go-archive/internal/archiveoptions github.com/moby/go-archive/tarheader -# github.com/moby/moby/api v1.56.0 +# github.com/moby/moby/api v1.56.1 ## explicit; go 1.24 github.com/moby/moby/api/pkg/authconfig github.com/moby/moby/api/pkg/stdcopy @@ -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.6.0 +# github.com/moby/moby/client v0.6.1 ## explicit; go 1.24 github.com/moby/moby/client github.com/moby/moby/client/internal