1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

Merge pull request #6563 from thaJeztah/bump_modules

vendor: github.com/moby/moby/api v1.52.0-beta.2, moby/client v0.1.0-beta.2
This commit is contained in:
Paweł Gronowski
2025-10-14 11:35:31 +02:00
committed by GitHub
9 changed files with 28 additions and 47 deletions

View File

@@ -101,24 +101,6 @@ var acceptedStatsFilters = map[string]bool{
"label": true,
}
// cloneFilters returns a deep copy of f.
//
// TODO(thaJeztah): add this as a "Clone" method on client.Filters.
func cloneFilters(f client.Filters) client.Filters {
if f == nil {
return nil
}
out := make(client.Filters, len(f))
for term, values := range f {
inner := make(map[string]bool, len(values))
for v, ok := range values {
inner[v] = ok
}
out[term] = inner
}
return out
}
// RunStats displays a live stream of resource usage statistics for one or more containers.
// This shows real-time information on CPU usage, memory usage, and network I/O.
//
@@ -183,8 +165,7 @@ func RunStats(ctx context.Context, dockerCLI command.Cli, options *StatsOptions)
// the original set of filters. Custom filters are used both
// to list containers and to filter events, but the "type" filter
// is not valid for filtering containers.
f := cloneFilters(options.Filters)
f.Add("type", string(events.ContainerEventType))
f := options.Filters.Clone().Add("type", string(events.ContainerEventType))
eventChan, errChan := apiClient.Events(ctx, client.EventsListOptions{
Filters: f,
})

View File

@@ -23,7 +23,7 @@ import (
// (i.e., "label=some-value" conflicts with "label!=some-value", and vice versa),
// then the filter defined in config.json is omitted.
func PruneFilters(dockerCLI config.Provider, filters client.Filters) client.Filters {
pruneFilters := cloneFilters(filters)
pruneFilters := filters.Clone()
cfg := dockerCLI.ConfigFile()
if cfg == nil {
@@ -58,21 +58,6 @@ func PruneFilters(dockerCLI config.Provider, filters client.Filters) client.Filt
return pruneFilters
}
// cloneFilters returns a deep copy of f, creating a new filter if f is nil.
//
// TODO(thaJeztah): add this as a "Clone" method on client.Filters.
func cloneFilters(f client.Filters) client.Filters {
out := make(client.Filters, len(f))
for term, values := range f {
inner := make(map[string]bool, len(values))
for v, ok := range values {
inner[v] = ok
}
out[term] = inner
}
return out
}
// ValidateOutputPath validates the output paths of the "docker cp" command.
func ValidateOutputPath(path string) error {
dir := filepath.Dir(filepath.Clean(path))

View File

@@ -28,8 +28,8 @@ require (
github.com/google/uuid v1.6.0
github.com/mattn/go-runewidth v0.0.17
github.com/moby/go-archive v0.1.0
github.com/moby/moby/api v1.52.0-beta.1.0.20251010153343-0769fe708773 // master
github.com/moby/moby/client v0.1.0-beta.0.0.20251010153343-0769fe708773 // master
github.com/moby/moby/api v1.52.0-beta.2
github.com/moby/moby/client v0.1.0-beta.2
github.com/moby/patternmatcher v0.6.0
github.com/moby/swarmkit/v2 v2.1.0
github.com/moby/sys/atomicwriter v0.1.0

View File

@@ -170,10 +170,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.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ=
github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo=
github.com/moby/moby/api v1.52.0-beta.1.0.20251010153343-0769fe708773 h1:SY73tuW7whJlBtFXGdeIlJhdGD6Hcwz7Wjl7E0Flolc=
github.com/moby/moby/api v1.52.0-beta.1.0.20251010153343-0769fe708773/go.mod h1:/ou52HkRydg4+odrUR3vFsGgjIyHvprrpEQEkweL10s=
github.com/moby/moby/client v0.1.0-beta.0.0.20251010153343-0769fe708773 h1:8hci/QpqJiLKap87P/1YF1pLtYF8XpWdPyQQmPPcYDc=
github.com/moby/moby/client v0.1.0-beta.0.0.20251010153343-0769fe708773/go.mod h1:o5CkJu0RlmnLWRZRaEd7fL6wo0Ggr8Hw/UvgqdIUBuI=
github.com/moby/moby/api v1.52.0-beta.2 h1:cuilbu4cLBZnlNpJXuv3QTleOxgo3kGqkNGt3ICe1yY=
github.com/moby/moby/api v1.52.0-beta.2/go.mod h1:/ou52HkRydg4+odrUR3vFsGgjIyHvprrpEQEkweL10s=
github.com/moby/moby/client v0.1.0-beta.2 h1:Uy7JhcAOvQAQriowODpHaAJokfw/AhUya0216sk1hAk=
github.com/moby/moby/client v0.1.0-beta.2/go.mod h1:yYEv2G6pYi8u63ga0zlU9KsM7DpoGXubtMaZMJE7/dw=
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.0 h1:u+cJ5hSyF3HnzsyI+NtegYxdIPQIuibk7IbpXNxuISM=

View File

@@ -46,7 +46,7 @@ type Config struct {
//
// Deprecated: this field is deprecated since API v1.44. Use EndpointSettings.MacAddress instead.
MacAddress string `json:",omitempty"`
OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile
OnBuild []string `json:",omitempty"` // ONBUILD metadata that were defined on the image Dockerfile
Labels map[string]string // List of labels set to this container
StopSignal string `json:",omitempty"` // Signal to stop a container
StopTimeout *int `json:",omitempty"` // Timeout (in seconds) to stop a container

View File

@@ -1,7 +1,9 @@
// Code generated by go-swagger; DO NOT EDIT.
package image
// ----------------------------------------------------------------------------
// Code generated by `swagger generate operation`. DO NOT EDIT.
// Code generated by `swagger generate operation`.
//
// See hack/generate-swagger-api.sh
// ----------------------------------------------------------------------------

View File

@@ -59,7 +59,7 @@ type Volume struct {
// does not support this feature.
//
// Example: {"hello":"world"}
Status map[string]interface{} `json:"Status,omitempty"`
Status map[string]any `json:"Status,omitempty"`
// usage data
UsageData *UsageData `json:"UsageData,omitempty"`

View File

@@ -30,6 +30,19 @@ func (f Filters) Add(term string, values ...string) Filters {
return f
}
// Clone returns a deep copy of f.
func (f Filters) Clone() Filters {
out := make(Filters, len(f))
for term, values := range f {
inner := make(map[string]bool, len(values))
for v, ok := range values {
inner[v] = ok
}
out[term] = inner
}
return out
}
// updateURLValues sets the "filters" key in values to the marshalled value of
// f, replacing any existing values. When f is empty, any existing "filters" key
// is removed.

4
vendor/modules.txt vendored
View File

@@ -168,7 +168,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.52.0-beta.1.0.20251010153343-0769fe708773
# github.com/moby/moby/api v1.52.0-beta.2
## explicit; go 1.23.0
github.com/moby/moby/api/pkg/authconfig
github.com/moby/moby/api/pkg/progress
@@ -193,7 +193,7 @@ github.com/moby/moby/api/types/swarm
github.com/moby/moby/api/types/system
github.com/moby/moby/api/types/versions
github.com/moby/moby/api/types/volume
# github.com/moby/moby/client v0.1.0-beta.0.0.20251010153343-0769fe708773
# github.com/moby/moby/client v0.1.0-beta.2
## explicit; go 1.23.0
github.com/moby/moby/client
github.com/moby/moby/client/internal