Skip to content

Commit c7177ed

Browse files
committed
update to beta.2
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent fdc0544 commit c7177ed

38 files changed

+496
-589
lines changed

cmd/compose/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,17 +324,17 @@ func resolveImageDigests(ctx context.Context, dockerCli command.Cli, model map[s
324324
func formatModel(model map[string]any, format string) (content []byte, err error) {
325325
switch format {
326326
case "json":
327-
content, err = json.MarshalIndent(model, "", " ")
327+
return json.MarshalIndent(model, "", " ")
328328
case "yaml":
329329
buf := bytes.NewBuffer([]byte{})
330330
encoder := yaml.NewEncoder(buf)
331331
encoder.SetIndent(2)
332332
err = encoder.Encode(model)
333333
content = buf.Bytes()
334+
return content, err
334335
default:
335336
return nil, fmt.Errorf("unsupported format %q", format)
336337
}
337-
return
338338
}
339339

340340
func runServices(ctx context.Context, dockerCli command.Cli, opts configOptions) error {

cmd/compose/list.go

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ package compose
1818

1919
import (
2020
"context"
21+
"errors"
2122
"fmt"
2223
"io"
24+
"regexp"
2325
"strings"
2426

2527
"github.com/docker/cli/cli/command"
2628
"github.com/docker/compose/v2/cmd/formatter"
29+
"github.com/moby/moby/client"
2730

2831
"github.com/docker/cli/opts"
2932
"github.com/spf13/cobra"
@@ -61,25 +64,45 @@ var acceptedListFilters = map[string]bool{
6164
"name": true,
6265
}
6366

67+
// match returns true if any of the values at key match the source string
68+
func match(filters client.Filters, field, source string) bool {
69+
if f, ok := filters[field]; ok && f[source] {
70+
return true
71+
}
72+
73+
fieldValues := filters[field]
74+
for name2match := range fieldValues {
75+
isMatch, err := regexp.MatchString(name2match, source)
76+
if err != nil {
77+
continue
78+
}
79+
if isMatch {
80+
return true
81+
}
82+
}
83+
return false
84+
}
85+
6486
func runList(ctx context.Context, dockerCli command.Cli, backend api.Service, lsOpts lsOptions) error {
6587
filters := lsOpts.Filter.Value()
66-
err := filters.Validate(acceptedListFilters)
67-
if err != nil {
68-
return err
88+
89+
for filter := range filters {
90+
if _, ok := acceptedListFilters[filter]; !ok {
91+
return errors.New("invalid filter '" + filter + "'")
92+
}
6993
}
7094

7195
stackList, err := backend.List(ctx, api.ListOptions{All: lsOpts.All})
7296
if err != nil {
7397
return err
7498
}
7599

76-
if filters.Len() > 0 {
100+
if len(filters) > 0 {
77101
var filtered []api.Stack
78102
for _, s := range stackList {
79-
if filters.Contains("name") && !filters.Match("name", s.Name) {
80-
continue
103+
if match(filters, "name", s.Name) {
104+
filtered = append(filtered, s)
81105
}
82-
filtered = append(filtered, s)
83106
}
84107
stackList = filtered
85108
}

cmd/compose/stats.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/docker/cli/cli/command"
2424
"github.com/docker/cli/cli/command/container"
25-
"github.com/moby/moby/api/types/filters"
25+
"github.com/moby/moby/client"
2626
"github.com/spf13/cobra"
2727

2828
"github.com/docker/compose/v2/pkg/api"
@@ -67,18 +67,17 @@ func runStats(ctx context.Context, dockerCli command.Cli, opts statsOptions, ser
6767
if err != nil {
6868
return err
6969
}
70-
filter := []filters.KeyValuePair{
71-
filters.Arg("label", fmt.Sprintf("%s=%s", api.ProjectLabel, name)),
72-
}
70+
f := client.Filters{}
71+
f.Add("label", fmt.Sprintf("%s=%s", api.ProjectLabel, name))
72+
7373
if len(service) > 0 {
74-
filter = append(filter, filters.Arg("label", fmt.Sprintf("%s=%s", api.ServiceLabel, service[0])))
74+
f.Add("label", fmt.Sprintf("%s=%s", api.ServiceLabel, service[0]))
7575
}
76-
args := filters.NewArgs(filter...)
7776
return container.RunStats(ctx, dockerCli, &container.StatsOptions{
7877
All: opts.all,
7978
NoStream: opts.noStream,
8079
NoTrunc: opts.noTrunc,
8180
Format: opts.format,
82-
Filters: &args,
81+
Filters: f,
8382
})
8483
}

cmd/formatter/container.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package formatter
1818

1919
import (
2020
"fmt"
21+
"net/netip"
2122
"strconv"
2223
"strings"
2324
"time"
@@ -214,8 +215,12 @@ func (c *ContainerContext) Publishers() api.PortPublishers {
214215
func (c *ContainerContext) Ports() string {
215216
var ports []container.PortSummary
216217
for _, publisher := range c.c.Publishers {
218+
var pIP netip.Addr
219+
if publisher.URL != "" {
220+
pIP, _ = netip.ParseAddr(publisher.URL)
221+
}
217222
ports = append(ports, container.PortSummary{
218-
IP: publisher.URL,
223+
IP: pIP,
219224
PrivatePort: uint16(publisher.TargetPort),
220225
PublicPort: uint16(publisher.PublishedPort),
221226
Type: publisher.Protocol,

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ module github.com/docker/compose/v2
22

33
go 1.24.9
44

5-
replace github.com/docker/buildx => github.com/thaJeztah/buildx v0.2.1-0.20250930103105-78222aba6f4e // https://github.com/docker/buildx/pull/3326
5+
replace github.com/docker/buildx => github.com/thaJeztah/buildx v0.2.1-0.20251014131213-dc504d137a66 // https://github.com/docker/buildx/pull/3326
66

77
// Need a replace, because master pseudo-version is considered "older" than the 28.x branch
8-
replace github.com/docker/cli => github.com/docker/cli v28.3.4-0.20250930073105-21e768adb78b+incompatible // master
8+
replace github.com/docker/cli => github.com/docker/cli v29.0.0-rc.1.0.20251014130057-171a9b70b273+incompatible // master (v29.0.0-dev)
99

1010
require (
1111
github.com/AlecAivazis/survey/v2 v2.3.7
@@ -20,7 +20,7 @@ require (
2020
github.com/davecgh/go-spew v1.1.1
2121
github.com/distribution/reference v0.6.0
2222
github.com/docker/buildx v0.29.1
23-
github.com/docker/cli v28.5.1+incompatible
23+
github.com/docker/cli v29.0.0-rc.1.0.20251014130057-171a9b70b273+incompatible // master (v29.0.0-dev)
2424
github.com/docker/cli-docs-tool v0.10.0
2525
github.com/docker/docker v28.5.1+incompatible
2626
github.com/docker/go-connections v0.6.0
@@ -35,8 +35,8 @@ require (
3535
github.com/mitchellh/go-ps v1.0.0
3636
github.com/moby/buildkit v0.25.1
3737
github.com/moby/go-archive v0.1.0
38-
github.com/moby/moby/api v1.52.0-beta.1.0.20250930082920-4ca8aedf929f // master
39-
github.com/moby/moby/client v0.1.0-beta.0.0.20250930082920-4ca8aedf929f // master
38+
github.com/moby/moby/api v1.52.0-beta.2
39+
github.com/moby/moby/client v0.1.0-beta.2
4040
github.com/moby/patternmatcher v0.6.0
4141
github.com/moby/sys/atomicwriter v0.1.0
4242
github.com/moby/term v0.5.2

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
126126
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
127127
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
128128
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
129-
github.com/docker/cli v28.3.4-0.20250930073105-21e768adb78b+incompatible h1:K2uHQn6524ckPytUji4SjzA8WNg1qMVMjUOECB7JBdE=
130-
github.com/docker/cli v28.3.4-0.20250930073105-21e768adb78b+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
129+
github.com/docker/cli v29.0.0-rc.1.0.20251014130057-171a9b70b273+incompatible h1:G2VeAxjFsbWMhTgf2qE908e32M040txrCkHYzsYCRTo=
130+
github.com/docker/cli v29.0.0-rc.1.0.20251014130057-171a9b70b273+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
131131
github.com/docker/cli-docs-tool v0.10.0 h1:bOD6mKynPQgojQi3s2jgcUWGp/Ebqy1SeCr9VfKQLLU=
132132
github.com/docker/cli-docs-tool v0.10.0/go.mod h1:5EM5zPnT2E7yCLERZmrDA234Vwn09fzRHP4aX1qwp1U=
133133
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
@@ -322,10 +322,10 @@ github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ
322322
github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo=
323323
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
324324
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
325-
github.com/moby/moby/api v1.52.0-beta.1.0.20250930082920-4ca8aedf929f h1:2KUOgolCU2LE+IbKEyrFK478EwZiI4mpeKO8nvztkno=
326-
github.com/moby/moby/api v1.52.0-beta.1.0.20250930082920-4ca8aedf929f/go.mod h1:8sBV0soUREiudtow4vqJGOxa4GyHI5vLQmvgKdHq5Ok=
327-
github.com/moby/moby/client v0.1.0-beta.0.0.20250930082920-4ca8aedf929f h1:H28/bSN4nOtXzD3iBu7SOMGNZh4FTEpFiZMNLWyiQDI=
328-
github.com/moby/moby/client v0.1.0-beta.0.0.20250930082920-4ca8aedf929f/go.mod h1:o5CkJu0RlmnLWRZRaEd7fL6wo0Ggr8Hw/UvgqdIUBuI=
325+
github.com/moby/moby/api v1.52.0-beta.2 h1:cuilbu4cLBZnlNpJXuv3QTleOxgo3kGqkNGt3ICe1yY=
326+
github.com/moby/moby/api v1.52.0-beta.2/go.mod h1:/ou52HkRydg4+odrUR3vFsGgjIyHvprrpEQEkweL10s=
327+
github.com/moby/moby/client v0.1.0-beta.2 h1:Uy7JhcAOvQAQriowODpHaAJokfw/AhUya0216sk1hAk=
328+
github.com/moby/moby/client v0.1.0-beta.2/go.mod h1:yYEv2G6pYi8u63ga0zlU9KsM7DpoGXubtMaZMJE7/dw=
329329
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
330330
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
331331
github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=
@@ -472,8 +472,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
472472
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
473473
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
474474
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
475-
github.com/thaJeztah/buildx v0.2.1-0.20250930103105-78222aba6f4e h1:9qLSNxXQ1rnJ96mx6WBtz0Q2rcUarPsbWJ65UcI5B88=
476-
github.com/thaJeztah/buildx v0.2.1-0.20250930103105-78222aba6f4e/go.mod h1:hvOmfSZ9FgdD59CI+/kkVM3XME2ASLh9MeTCTaD6Y+U=
475+
github.com/thaJeztah/buildx v0.2.1-0.20251014131213-dc504d137a66 h1:GPS+PcI1H6ykqHO2YaaGw2ZiTbSHrEFMGPK+nNdbHsU=
476+
github.com/thaJeztah/buildx v0.2.1-0.20251014131213-dc504d137a66/go.mod h1:SVX7uR2LLY2hMOcI2lOTb/S/9nvbbkdY2yfPIcvXiZk=
477477
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
478478
github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw=
479479
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA=

pkg/api/dryrunclient.go

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ import (
3333
"github.com/docker/buildx/util/imagetools"
3434
"github.com/docker/cli/cli/command"
3535
moby "github.com/moby/moby/api/types"
36-
"github.com/moby/moby/api/types/build"
3736
containerType "github.com/moby/moby/api/types/container"
3837
"github.com/moby/moby/api/types/events"
39-
"github.com/moby/moby/api/types/filters"
4038
"github.com/moby/moby/api/types/image"
4139
"github.com/moby/moby/api/types/jsonstream"
4240
"github.com/moby/moby/api/types/network"
@@ -241,12 +239,11 @@ func (d *DryRunClient) ImageInspectWithRaw(ctx context.Context, imageName string
241239
return resp, buf.Bytes(), err
242240
}
243241

244-
func (d *DryRunClient) ImagePull(ctx context.Context, ref string, options client.ImagePullOptions) (io.ReadCloser, error) {
242+
func (d *DryRunClient) ImagePull(ctx context.Context, ref string, options client.ImagePullOptions) (client.ImagePullResponse, error) {
245243
if _, _, err := d.resolver.Resolve(ctx, ref); err != nil {
246-
return nil, err
244+
return client.ImagePullResponse{}, err
247245
}
248-
rc := io.NopCloser(strings.NewReader(""))
249-
return rc, nil
246+
return client.ImagePullResponse{}, nil
250247
}
251248

252249
func (d *DryRunClient) ImagePush(ctx context.Context, ref string, options client.ImagePushOptions) (io.ReadCloser, error) {
@@ -417,20 +414,20 @@ func (d *DryRunClient) ContainerWait(ctx context.Context, container string, cond
417414
return d.apiClient.ContainerWait(ctx, container, condition)
418415
}
419416

420-
func (d *DryRunClient) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (containerType.PruneReport, error) {
417+
func (d *DryRunClient) ContainersPrune(ctx context.Context, pruneFilters client.Filters) (containerType.PruneReport, error) {
421418
return d.apiClient.ContainersPrune(ctx, pruneFilters)
422419
}
423420

424421
func (d *DryRunClient) DistributionInspect(ctx context.Context, imageName, encodedRegistryAuth string) (registry.DistributionInspect, error) {
425422
return d.apiClient.DistributionInspect(ctx, imageName, encodedRegistryAuth)
426423
}
427424

428-
func (d *DryRunClient) BuildCachePrune(ctx context.Context, opts client.BuildCachePruneOptions) (*build.CachePruneReport, error) {
425+
func (d *DryRunClient) BuildCachePrune(ctx context.Context, opts client.BuildCachePruneOptions) (client.BuildCachePruneResult, error) {
429426
return d.apiClient.BuildCachePrune(ctx, opts)
430427
}
431428

432-
func (d *DryRunClient) BuildCancel(ctx context.Context, id string) error {
433-
return d.apiClient.BuildCancel(ctx, id)
429+
func (d *DryRunClient) BuildCancel(ctx context.Context, id string, opts client.BuildCancelOptions) error {
430+
return d.apiClient.BuildCancel(ctx, id, opts)
434431
}
435432

436433
func (d *DryRunClient) ImageCreate(ctx context.Context, parentReference string, options client.ImageCreateOptions) (io.ReadCloser, error) {
@@ -465,7 +462,7 @@ func (d *DryRunClient) ImageTag(ctx context.Context, imageName, ref string) erro
465462
return d.apiClient.ImageTag(ctx, imageName, ref)
466463
}
467464

468-
func (d *DryRunClient) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (image.PruneReport, error) {
465+
func (d *DryRunClient) ImagesPrune(ctx context.Context, pruneFilter client.Filters) (image.PruneReport, error) {
469466
return d.apiClient.ImagesPrune(ctx, pruneFilter)
470467
}
471468

@@ -497,11 +494,11 @@ func (d *DryRunClient) NetworkList(ctx context.Context, options client.NetworkLi
497494
return d.apiClient.NetworkList(ctx, options)
498495
}
499496

500-
func (d *DryRunClient) NetworksPrune(ctx context.Context, pruneFilter filters.Args) (network.PruneReport, error) {
497+
func (d *DryRunClient) NetworksPrune(ctx context.Context, pruneFilter client.Filters) (network.PruneReport, error) {
501498
return d.apiClient.NetworksPrune(ctx, pruneFilter)
502499
}
503500

504-
func (d *DryRunClient) PluginList(ctx context.Context, filter filters.Args) (plugin.ListResponse, error) {
501+
func (d *DryRunClient) PluginList(ctx context.Context, filter client.Filters) (plugin.ListResponse, error) {
505502
return d.apiClient.PluginList(ctx, filter)
506503
}
507504

@@ -657,7 +654,7 @@ func (d *DryRunClient) VolumeList(ctx context.Context, opts client.VolumeListOpt
657654
return d.apiClient.VolumeList(ctx, opts)
658655
}
659656

660-
func (d *DryRunClient) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (volume.PruneReport, error) {
657+
func (d *DryRunClient) VolumesPrune(ctx context.Context, pruneFilter client.Filters) (volume.PruneReport, error) {
661658
return d.apiClient.VolumesPrune(ctx, pruneFilter)
662659
}
663660

pkg/bridge/transformers.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"github.com/docker/cli/cli/command"
2626
"github.com/moby/go-archive"
2727
"github.com/moby/moby/api/types/container"
28-
"github.com/moby/moby/api/types/filters"
2928
"github.com/moby/moby/api/types/image"
3029
"github.com/moby/moby/api/types/network"
3130
"github.com/moby/moby/client"
@@ -114,8 +113,6 @@ COPY templates /templates
114113
func ListTransformers(ctx context.Context, dockerCli command.Cli) ([]image.Summary, error) {
115114
api := dockerCli.Client()
116115
return api.ImageList(ctx, client.ImageListOptions{
117-
Filters: filters.NewArgs(
118-
filters.Arg("label", fmt.Sprintf("%s=%s", TransformerLabel, "transformation")),
119-
),
116+
Filters: make(client.Filters).Add("label", fmt.Sprintf("%s=%s", TransformerLabel, "transformation")),
120117
})
121118
}

pkg/compose/build_bake.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/containerd/errdefs"
3838
"github.com/docker/cli/cli-plugins/manager"
3939
"github.com/docker/cli/cli/command"
40-
"github.com/docker/cli/cli/command/image/build"
40+
buildpkg "github.com/docker/cli/cli/command/image/build"
4141
"github.com/docker/compose/v2/pkg/api"
4242
"github.com/docker/compose/v2/pkg/progress"
4343
"github.com/moby/buildkit/client"
@@ -501,7 +501,7 @@ func dockerFilePath(ctxName string, dockerfile string) string {
501501
if dockerfile == "" {
502502
return ""
503503
}
504-
if contextType, _ := build.DetectContextType(ctxName); contextType == build.ContextTypeGit {
504+
if contextType, _ := buildpkg.DetectContextType(ctxName); contextType == buildpkg.ContextTypeGit {
505505
return dockerfile
506506
}
507507
if !filepath.IsAbs(dockerfile) {

pkg/compose/compose.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"github.com/docker/cli/cli/streams"
3333
"github.com/jonboulle/clockwork"
3434
"github.com/moby/moby/api/types/container"
35-
"github.com/moby/moby/api/types/filters"
3635
"github.com/moby/moby/api/types/swarm"
3736
"github.com/moby/moby/client"
3837

@@ -242,7 +241,7 @@ func increment(scale *int) *int {
242241

243242
func (s *composeService) actualVolumes(ctx context.Context, projectName string) (types.Volumes, error) {
244243
opts := client.VolumeListOptions{
245-
Filters: filters.NewArgs(projectFilter(projectName)),
244+
Filters: projectFilter(projectName),
246245
}
247246
volumes, err := s.apiClient().VolumeList(ctx, opts)
248247
if err != nil {
@@ -262,7 +261,7 @@ func (s *composeService) actualVolumes(ctx context.Context, projectName string)
262261

263262
func (s *composeService) actualNetworks(ctx context.Context, projectName string) (types.Networks, error) {
264263
networks, err := s.apiClient().NetworkList(ctx, client.NetworkListOptions{
265-
Filters: filters.NewArgs(projectFilter(projectName)),
264+
Filters: projectFilter(projectName),
266265
})
267266
if err != nil {
268267
return nil, err
@@ -310,6 +309,7 @@ type runtimeVersionCache struct {
310309
var runtimeVersion runtimeVersionCache
311310

312311
func (s *composeService) RuntimeVersion(ctx context.Context) (string, error) {
312+
// TODO(thaJeztah): this should use Client.ClientVersion), which has the negotiated version.
313313
runtimeVersion.once.Do(func() {
314314
version, err := s.dockerCli.Client().ServerVersion(ctx)
315315
if err != nil {

0 commit comments

Comments
 (0)