Skip to content

Commit ad4cbee

Browse files
thaJeztahglours
authored andcommitted
bump github.com/docker/docker, docker/cli v28.2.2
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 60256a8 commit ad4cbee

File tree

13 files changed

+62
-65
lines changed

13 files changed

+62
-65
lines changed

cmd/compose/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ func runRun(ctx context.Context, backend api.Service, project *types.Project, op
324324
Interactive: options.interactive,
325325
WorkingDir: options.workdir,
326326
User: options.user,
327-
CapAdd: options.capAdd.GetAll(),
328-
CapDrop: options.capDrop.GetAll(),
327+
CapAdd: options.capAdd.GetSlice(),
328+
CapDrop: options.capDrop.GetSlice(),
329329
Environment: environment.Values(),
330330
Entrypoint: options.entrypointCmd,
331331
Labels: labels,

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ require (
1010
github.com/buger/goterm v1.0.4
1111
github.com/compose-spec/compose-go/v2 v2.6.4
1212
github.com/containerd/containerd/v2 v2.1.1
13+
github.com/containerd/errdefs v1.0.0
1314
github.com/containerd/platforms v1.0.0-rc.1
1415
github.com/davecgh/go-spew v1.1.1
1516
github.com/distribution/reference v0.6.0
1617
github.com/docker/buildx v0.24.0
17-
github.com/docker/cli v28.1.1+incompatible
18+
github.com/docker/cli v28.2.2+incompatible
1819
github.com/docker/cli-docs-tool v0.10.0
19-
github.com/docker/docker v28.1.1+incompatible
20+
github.com/docker/docker v28.2.2+incompatible
2021
github.com/docker/go-connections v0.5.0
2122
github.com/docker/go-units v0.5.0
2223
github.com/eiannone/keyboard v0.0.0-20220611211555-0d226195f203
@@ -86,7 +87,6 @@ require (
8687
github.com/containerd/console v1.0.4 // indirect
8788
github.com/containerd/containerd/api v1.9.0 // indirect
8889
github.com/containerd/continuity v0.4.5 // indirect
89-
github.com/containerd/errdefs v1.0.0 // indirect
9090
github.com/containerd/errdefs/pkg v0.3.0 // indirect
9191
github.com/containerd/log v0.1.0 // indirect
9292
github.com/containerd/ttrpc v1.2.7 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
127127
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
128128
github.com/docker/buildx v0.24.0 h1:qiD+xktY+Fs3R79oz8M+7pbhip78qGLx6LBuVmyb+64=
129129
github.com/docker/buildx v0.24.0/go.mod h1:vYkdBUBjFo/i5vUE0mkajGlk03gE0T/HaGXXhgIxo8E=
130-
github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k=
131-
github.com/docker/cli v28.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
130+
github.com/docker/cli v28.2.2+incompatible h1:qzx5BNUDFqlvyq4AHzdNB7gSyVTmU4cgsyN9SdInc1A=
131+
github.com/docker/cli v28.2.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
132132
github.com/docker/cli-docs-tool v0.10.0 h1:bOD6mKynPQgojQi3s2jgcUWGp/Ebqy1SeCr9VfKQLLU=
133133
github.com/docker/cli-docs-tool v0.10.0/go.mod h1:5EM5zPnT2E7yCLERZmrDA234Vwn09fzRHP4aX1qwp1U=
134134
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
135135
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
136136
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
137-
github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I=
138-
github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
137+
github.com/docker/docker v28.2.2+incompatible h1:CjwRSksz8Yo4+RmQ339Dp/D2tGO5JxwYeqtMOEe0LDw=
138+
github.com/docker/docker v28.2.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
139139
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
140140
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
141141
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=

pkg/api/dryrunclient.go

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"github.com/docker/buildx/util/imagetools"
3535
"github.com/docker/cli/cli/command"
3636
moby "github.com/docker/docker/api/types"
37+
"github.com/docker/docker/api/types/build"
3738
"github.com/docker/docker/api/types/checkpoint"
3839
containerType "github.com/docker/docker/api/types/container"
3940
"github.com/docker/docker/api/types/events"
@@ -205,18 +206,18 @@ func (d *DryRunClient) CopyToContainer(ctx context.Context, container, path stri
205206
return nil
206207
}
207208

208-
func (d *DryRunClient) ImageBuild(ctx context.Context, reader io.Reader, options moby.ImageBuildOptions) (moby.ImageBuildResponse, error) {
209+
func (d *DryRunClient) ImageBuild(ctx context.Context, reader io.Reader, options build.ImageBuildOptions) (build.ImageBuildResponse, error) {
209210
jsonMessage, err := json.Marshal(&jsonmessage.JSONMessage{
210211
Status: fmt.Sprintf("%[1]sSuccessfully built: dryRunID\n%[1]sSuccessfully tagged: %[2]s\n", DRYRUN_PREFIX, options.Tags[0]),
211212
Progress: &jsonmessage.JSONProgress{},
212213
ID: "",
213214
})
214215
if err != nil {
215-
return moby.ImageBuildResponse{}, err
216+
return build.ImageBuildResponse{}, err
216217
}
217218
rc := io.NopCloser(bytes.NewReader(jsonMessage))
218219

219-
return moby.ImageBuildResponse{
220+
return build.ImageBuildResponse{
220221
Body: rc,
221222
OSType: "",
222223
}, nil
@@ -334,11 +335,11 @@ func (d *DryRunClient) ContainerExecStart(ctx context.Context, execID string, co
334335

335336
// Functions delegated to original APIClient (not used by Compose or not modifying the Compose stack
336337

337-
func (d *DryRunClient) ConfigList(ctx context.Context, options moby.ConfigListOptions) ([]swarm.Config, error) {
338+
func (d *DryRunClient) ConfigList(ctx context.Context, options swarm.ConfigListOptions) ([]swarm.Config, error) {
338339
return d.apiClient.ConfigList(ctx, options)
339340
}
340341

341-
func (d *DryRunClient) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (moby.ConfigCreateResponse, error) {
342+
func (d *DryRunClient) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (swarm.ConfigCreateResponse, error) {
342343
return d.apiClient.ConfigCreate(ctx, config)
343344
}
344345

@@ -422,7 +423,7 @@ func (d *DryRunClient) DistributionInspect(ctx context.Context, imageName, encod
422423
return d.apiClient.DistributionInspect(ctx, imageName, encodedRegistryAuth)
423424
}
424425

425-
func (d *DryRunClient) BuildCachePrune(ctx context.Context, opts moby.BuildCachePruneOptions) (*moby.BuildCachePruneReport, error) {
426+
func (d *DryRunClient) BuildCachePrune(ctx context.Context, opts build.CachePruneOptions) (*build.CachePruneReport, error) {
426427
return d.apiClient.BuildCachePrune(ctx, opts)
427428
}
428429

@@ -470,11 +471,11 @@ func (d *DryRunClient) NodeInspectWithRaw(ctx context.Context, nodeID string) (s
470471
return d.apiClient.NodeInspectWithRaw(ctx, nodeID)
471472
}
472473

473-
func (d *DryRunClient) NodeList(ctx context.Context, options moby.NodeListOptions) ([]swarm.Node, error) {
474+
func (d *DryRunClient) NodeList(ctx context.Context, options swarm.NodeListOptions) ([]swarm.Node, error) {
474475
return d.apiClient.NodeList(ctx, options)
475476
}
476477

477-
func (d *DryRunClient) NodeRemove(ctx context.Context, nodeID string, options moby.NodeRemoveOptions) error {
478+
func (d *DryRunClient) NodeRemove(ctx context.Context, nodeID string, options swarm.NodeRemoveOptions) error {
478479
return d.apiClient.NodeRemove(ctx, nodeID, options)
479480
}
480481

@@ -538,23 +539,23 @@ func (d *DryRunClient) PluginCreate(ctx context.Context, createContext io.Reader
538539
return d.apiClient.PluginCreate(ctx, createContext, options)
539540
}
540541

541-
func (d *DryRunClient) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options moby.ServiceCreateOptions) (swarm.ServiceCreateResponse, error) {
542+
func (d *DryRunClient) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options swarm.ServiceCreateOptions) (swarm.ServiceCreateResponse, error) {
542543
return d.apiClient.ServiceCreate(ctx, service, options)
543544
}
544545

545-
func (d *DryRunClient) ServiceInspectWithRaw(ctx context.Context, serviceID string, options moby.ServiceInspectOptions) (swarm.Service, []byte, error) {
546+
func (d *DryRunClient) ServiceInspectWithRaw(ctx context.Context, serviceID string, options swarm.ServiceInspectOptions) (swarm.Service, []byte, error) {
546547
return d.apiClient.ServiceInspectWithRaw(ctx, serviceID, options)
547548
}
548549

549-
func (d *DryRunClient) ServiceList(ctx context.Context, options moby.ServiceListOptions) ([]swarm.Service, error) {
550+
func (d *DryRunClient) ServiceList(ctx context.Context, options swarm.ServiceListOptions) ([]swarm.Service, error) {
550551
return d.apiClient.ServiceList(ctx, options)
551552
}
552553

553554
func (d *DryRunClient) ServiceRemove(ctx context.Context, serviceID string) error {
554555
return d.apiClient.ServiceRemove(ctx, serviceID)
555556
}
556557

557-
func (d *DryRunClient) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options moby.ServiceUpdateOptions) (swarm.ServiceUpdateResponse, error) {
558+
func (d *DryRunClient) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options swarm.ServiceUpdateOptions) (swarm.ServiceUpdateResponse, error) {
558559
return d.apiClient.ServiceUpdate(ctx, serviceID, version, service, options)
559560
}
560561

@@ -570,7 +571,7 @@ func (d *DryRunClient) TaskInspectWithRaw(ctx context.Context, taskID string) (s
570571
return d.apiClient.TaskInspectWithRaw(ctx, taskID)
571572
}
572573

573-
func (d *DryRunClient) TaskList(ctx context.Context, options moby.TaskListOptions) ([]swarm.Task, error) {
574+
func (d *DryRunClient) TaskList(ctx context.Context, options swarm.TaskListOptions) ([]swarm.Task, error) {
574575
return d.apiClient.TaskList(ctx, options)
575576
}
576577

@@ -582,7 +583,7 @@ func (d *DryRunClient) SwarmJoin(ctx context.Context, req swarm.JoinRequest) err
582583
return d.apiClient.SwarmJoin(ctx, req)
583584
}
584585

585-
func (d *DryRunClient) SwarmGetUnlockKey(ctx context.Context) (moby.SwarmUnlockKeyResponse, error) {
586+
func (d *DryRunClient) SwarmGetUnlockKey(ctx context.Context) (swarm.UnlockKeyResponse, error) {
586587
return d.apiClient.SwarmGetUnlockKey(ctx)
587588
}
588589

@@ -602,11 +603,11 @@ func (d *DryRunClient) SwarmUpdate(ctx context.Context, version swarm.Version, s
602603
return d.apiClient.SwarmUpdate(ctx, version, swarmSpec, flags)
603604
}
604605

605-
func (d *DryRunClient) SecretList(ctx context.Context, options moby.SecretListOptions) ([]swarm.Secret, error) {
606+
func (d *DryRunClient) SecretList(ctx context.Context, options swarm.SecretListOptions) ([]swarm.Secret, error) {
606607
return d.apiClient.SecretList(ctx, options)
607608
}
608609

609-
func (d *DryRunClient) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (moby.SecretCreateResponse, error) {
610+
func (d *DryRunClient) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (swarm.SecretCreateResponse, error) {
610611
return d.apiClient.SecretCreate(ctx, secret)
611612
}
612613

pkg/bridge/convert.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@ import (
2626
"strconv"
2727

2828
"github.com/compose-spec/compose-go/v2/types"
29+
cerrdefs "github.com/containerd/errdefs"
2930
"github.com/docker/cli/cli/command"
3031
cli "github.com/docker/cli/cli/command/container"
3132
"github.com/docker/compose/v2/pkg/api"
3233
"github.com/docker/compose/v2/pkg/utils"
3334
"github.com/docker/docker/api/types/container"
3435
"github.com/docker/docker/api/types/image"
3536
"github.com/docker/docker/api/types/network"
36-
"github.com/docker/docker/errdefs"
3737
"github.com/docker/docker/pkg/jsonmessage"
38+
"github.com/docker/go-connections/nat"
3839
"gopkg.in/yaml.v3"
3940
)
4041

@@ -151,7 +152,7 @@ func LoadAdditionalResources(ctx context.Context, cli command.Cli, project *type
151152
exposed := utils.Set[string]{}
152153
exposed.AddAll(service.Expose...)
153154
for port := range inspect.Config.ExposedPorts {
154-
exposed.Add(port.Port())
155+
exposed.Add(nat.Port(port).Port())
155156
}
156157
for _, port := range service.Ports {
157158
exposed.Add(strconv.Itoa(int(port.Target)))
@@ -197,7 +198,7 @@ func loadFileObject(conf types.FileObjectConfig) (types.FileObjectConfig, error)
197198

198199
func inspectWithPull(ctx context.Context, dockerCli command.Cli, imageName string) (image.InspectResponse, error) {
199200
inspect, err := dockerCli.Client().ImageInspect(ctx, imageName)
200-
if errdefs.IsNotFound(err) {
201+
if cerrdefs.IsNotFound(err) {
201202
var stream io.ReadCloser
202203
stream, err = dockerCli.Client().ImagePull(ctx, imageName, image.PullOptions{})
203204
if err != nil {

pkg/compose/build_classic.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,19 @@ import (
2727
"runtime"
2828
"strings"
2929

30-
"github.com/docker/cli/cli/command"
31-
32-
"github.com/docker/docker/api/types/registry"
33-
3430
"github.com/compose-spec/compose-go/v2/types"
3531
"github.com/docker/cli/cli"
32+
"github.com/docker/cli/cli/command"
3633
"github.com/docker/cli/cli/command/image/build"
37-
dockertypes "github.com/docker/docker/api/types"
34+
"github.com/docker/compose/v2/pkg/api"
35+
buildtypes "github.com/docker/docker/api/types/build"
3836
"github.com/docker/docker/api/types/container"
37+
"github.com/docker/docker/api/types/registry"
3938
"github.com/docker/docker/builder/remotecontext/urlutil"
4039
"github.com/docker/docker/pkg/jsonmessage"
4140
"github.com/docker/docker/pkg/progress"
4241
"github.com/docker/docker/pkg/streamformatter"
4342
"github.com/moby/go-archive"
44-
45-
"github.com/docker/compose/v2/pkg/api"
46-
4743
"github.com/sirupsen/logrus"
4844
)
4945

@@ -179,7 +175,7 @@ func (s *composeService) doBuildClassic(ctx context.Context, project *types.Proj
179175

180176
imageID := ""
181177
aux := func(msg jsonmessage.JSONMessage) {
182-
var result dockertypes.BuildResult
178+
var result buildtypes.Result
183179
if err := json.Unmarshal(*msg.Aux, &result); err != nil {
184180
logrus.Errorf("Failed to parse aux message: %s", err)
185181
} else {
@@ -219,10 +215,10 @@ func isLocalDir(c string) bool {
219215
return err == nil
220216
}
221217

222-
func imageBuildOptions(dockerCli command.Cli, project *types.Project, service types.ServiceConfig, options api.BuildOptions) dockertypes.ImageBuildOptions {
218+
func imageBuildOptions(dockerCli command.Cli, project *types.Project, service types.ServiceConfig, options api.BuildOptions) buildtypes.ImageBuildOptions {
223219
config := service.Build
224-
return dockertypes.ImageBuildOptions{
225-
Version: dockertypes.BuilderV1,
220+
return buildtypes.ImageBuildOptions{
221+
Version: buildtypes.BuilderV1,
226222
Tags: config.Tags,
227223
NoCache: config.NoCache,
228224
Remove: true,

pkg/compose/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (s *composeService) commit(ctx context.Context, projectName string, options
6969
Reference: options.Reference,
7070
Comment: options.Comment,
7171
Author: options.Author,
72-
Changes: options.Changes.GetAll(),
72+
Changes: options.Changes.GetSlice(),
7373
Pause: options.Pause,
7474
})
7575
if err != nil {

pkg/compose/create.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030

3131
"github.com/compose-spec/compose-go/v2/paths"
3232
"github.com/compose-spec/compose-go/v2/types"
33+
cerrdefs "github.com/containerd/errdefs"
3334
"github.com/docker/compose/v2/pkg/api"
3435
"github.com/docker/compose/v2/pkg/progress"
3536
"github.com/docker/compose/v2/pkg/prompt"
@@ -41,7 +42,6 @@ import (
4142
"github.com/docker/docker/api/types/strslice"
4243
"github.com/docker/docker/api/types/versions"
4344
volumetypes "github.com/docker/docker/api/types/volume"
44-
"github.com/docker/docker/errdefs"
4545
"github.com/docker/go-connections/nat"
4646
"github.com/sirupsen/logrus"
4747
cdi "tags.cncf.io/container-device-interface/pkg/parser"
@@ -1253,7 +1253,7 @@ func (s *composeService) ensureNetwork(ctx context.Context, project *types.Proje
12531253
}
12541254

12551255
id, err := s.resolveOrCreateNetwork(ctx, project, name, n)
1256-
if errdefs.IsConflict(err) {
1256+
if cerrdefs.IsConflict(err) {
12571257
// Maybe another execution of `docker compose up|run` created same network
12581258
// let's retry once
12591259
return s.resolveOrCreateNetwork(ctx, project, name, n)
@@ -1438,7 +1438,7 @@ func (s *composeService) resolveExternalNetwork(ctx context.Context, n *types.Ne
14381438
sn, err := s.apiClient().NetworkInspect(ctx, n.Name, network.InspectOptions{})
14391439
if err == nil {
14401440
networks = append(networks, sn)
1441-
} else if !errdefs.IsNotFound(err) {
1441+
} else if !cerrdefs.IsNotFound(err) {
14421442
return "", err
14431443
}
14441444

@@ -1475,7 +1475,7 @@ func (s *composeService) resolveExternalNetwork(ctx context.Context, n *types.Ne
14751475
func (s *composeService) ensureVolume(ctx context.Context, name string, volume types.VolumeConfig, project *types.Project, assumeYes bool) (string, error) {
14761476
inspected, err := s.apiClient().VolumeInspect(ctx, volume.Name)
14771477
if err != nil {
1478-
if !errdefs.IsNotFound(err) {
1478+
if !cerrdefs.IsNotFound(err) {
14791479
return "", err
14801480
}
14811481
if volume.External {

0 commit comments

Comments
 (0)