Skip to content

Commit 7440345

Browse files
committed
WIP migrate to moby/api and moby/client
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 8f91793 commit 7440345

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+350
-173
lines changed

cmd/compose/bridge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323

2424
"github.com/distribution/reference"
2525
"github.com/docker/cli/cli/command"
26-
"github.com/docker/docker/api/types/image"
2726
"github.com/docker/docker/pkg/stringid"
2827
"github.com/docker/go-units"
28+
"github.com/moby/moby/api/types/image"
2929
"github.com/spf13/cobra"
3030

3131
"github.com/docker/compose/v2/cmd/formatter"

cmd/compose/stats.go

Lines changed: 1 addition & 1 deletion
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/docker/docker/api/types/filters"
25+
"github.com/moby/moby/api/types/filters"
2626
"github.com/spf13/cobra"
2727

2828
"github.com/docker/compose/v2/pkg/api"

cmd/formatter/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424

2525
"github.com/docker/cli/cli/command/formatter"
2626
"github.com/docker/compose/v2/pkg/api"
27-
"github.com/docker/docker/api/types/container"
2827
"github.com/docker/docker/pkg/stringid"
2928
"github.com/docker/go-units"
29+
"github.com/moby/moby/api/types/container"
3030
)
3131

3232
const (

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/docker/cli/cli-plugins/plugin"
2525
"github.com/docker/cli/cli/command"
2626
"github.com/docker/compose/v2/cmd/cmdtrace"
27-
"github.com/docker/docker/client"
27+
"github.com/moby/moby/client"
2828
"github.com/sirupsen/logrus"
2929
"github.com/spf13/cobra"
3030

go.mod

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

33
go 1.23.10
44

5+
replace (
6+
github.com/docker/buildx => github.com/thaJeztah/buildx v0.2.1-0.20250721183044-80b40a761230
7+
github.com/docker/cli => github.com/thaJeztah/cli v0.0.0-20250721181607-54f7b18e5e1c
8+
github.com/docker/docker => github.com/dmcgowan/docker v1.1.3-0.20250721163026-c47afd41c82c
9+
github.com/moby/moby/api => github.com/dmcgowan/docker/api v0.0.0-20250721163026-c47afd41c82c
10+
github.com/moby/moby/client => github.com/dmcgowan/docker/client v0.0.0-20250721163026-c47afd41c82c
11+
)
12+
513
require (
614
github.com/AlecAivazis/survey/v2 v2.3.7
715
github.com/DefangLabs/secret-detector v0.0.0-20250403165618-22662109213e
@@ -31,6 +39,8 @@ require (
3139
github.com/mitchellh/mapstructure v1.5.0
3240
github.com/moby/buildkit v0.23.2
3341
github.com/moby/go-archive v0.1.0
42+
github.com/moby/moby/api v0.0.0
43+
github.com/moby/moby/client v0.0.0-00010101000000-000000000000
3444
github.com/moby/patternmatcher v0.6.0
3545
github.com/moby/sys/atomicwriter v0.1.0
3646
github.com/moby/term v0.5.2
@@ -64,7 +74,7 @@ require (
6474
require (
6575
dario.cat/mergo v1.0.1 // indirect
6676
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
67-
github.com/Masterminds/semver/v3 v3.2.1 // indirect
77+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
6878
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
6979
github.com/aws/aws-sdk-go-v2 v1.30.3 // indirect
7080
github.com/aws/aws-sdk-go-v2/config v1.27.27 // indirect
@@ -175,9 +185,9 @@ require (
175185
github.com/zclconf/go-cty v1.16.2 // indirect
176186
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
177187
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
178-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.56.0 // indirect
179-
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.31.0 // indirect
180-
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.31.0 // indirect
188+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 // indirect
189+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0 // indirect
190+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.35.0 // indirect
181191
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 // indirect
182192
go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect
183193
go.opentelemetry.io/proto/otlp v1.5.0 // indirect

go.sum

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ
1010
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
1111
github.com/DefangLabs/secret-detector v0.0.0-20250403165618-22662109213e h1:rd4bOvKmDIx0WeTv9Qz+hghsgyjikFiPrseXHlKepO0=
1212
github.com/DefangLabs/secret-detector v0.0.0-20250403165618-22662109213e/go.mod h1:blbwPQh4DTlCZEfk1BLU4oMIhLda2U+A840Uag9DsZw=
13-
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
14-
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
13+
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
14+
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
1515
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
1616
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
1717
github.com/Microsoft/hcsshim v0.13.0 h1:/BcXOiS6Qi7N9XqUcv27vkIuVOkBEcWstd2pMlWSeaA=
@@ -127,17 +127,17 @@ 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/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
129129
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
130-
github.com/docker/buildx v0.25.0 h1:qs5WxBo0wQKSXcQ+v6UhWaeM2Pu+95ZCymaimRzInaE=
131-
github.com/docker/buildx v0.25.0/go.mod h1:xJcOeBhz49tgqN174MMGuOU4bxNmgfaLnZn7Gm641EE=
132-
github.com/docker/cli v28.3.2+incompatible h1:mOt9fcLE7zaACbxW1GeS65RI67wIJrTnqS3hP2huFsY=
133-
github.com/docker/cli v28.3.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
130+
github.com/dmcgowan/docker v1.1.3-0.20250721163026-c47afd41c82c h1:e7S3kkLfc9tYnOE45a9BXuJz6EWMUHpyHrPS95NiJGo=
131+
github.com/dmcgowan/docker v1.1.3-0.20250721163026-c47afd41c82c/go.mod h1:AKi7Z6FzccBGsB9PP0AbY4O0g9QR4Y5RmrVhRbN4r3Q=
132+
github.com/dmcgowan/docker/api v0.0.0-20250721163026-c47afd41c82c h1:T/ul6Txoup+5ogpvVM8Rpp9Ie3E1gBK0iXkWAfXcp60=
133+
github.com/dmcgowan/docker/api v0.0.0-20250721163026-c47afd41c82c/go.mod h1:VA4aMWurxqzKHCXKDSqoBx3hiJxnTStnqSG5zgc8XL0=
134+
github.com/dmcgowan/docker/client v0.0.0-20250721163026-c47afd41c82c h1:1FlmxGvSUQHWo2ufsO70utGCx9S7NAI7MDFmtQMWX5Y=
135+
github.com/dmcgowan/docker/client v0.0.0-20250721163026-c47afd41c82c/go.mod h1:Ax3ccMnrUUuchkrGDgHpXDeoI0g3MCgZy0V0vDo0+qs=
134136
github.com/docker/cli-docs-tool v0.10.0 h1:bOD6mKynPQgojQi3s2jgcUWGp/Ebqy1SeCr9VfKQLLU=
135137
github.com/docker/cli-docs-tool v0.10.0/go.mod h1:5EM5zPnT2E7yCLERZmrDA234Vwn09fzRHP4aX1qwp1U=
136138
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
137139
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
138140
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
139-
github.com/docker/docker v28.3.2+incompatible h1:wn66NJ6pWB1vBZIilP8G3qQPqHy5XymfYn5vsqeA5oA=
140-
github.com/docker/docker v28.3.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
141141
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
142142
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
143143
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
@@ -471,6 +471,10 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
471471
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
472472
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
473473
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
474+
github.com/thaJeztah/buildx v0.2.1-0.20250721183044-80b40a761230 h1:5J5Z3iS3q76CIENoB91a3A58K+07ic4zOaPbBNUrwdI=
475+
github.com/thaJeztah/buildx v0.2.1-0.20250721183044-80b40a761230/go.mod h1:RLiruB8TwUquAgqspygSz9r+MTGYSlRaR5IU9pMBJvA=
476+
github.com/thaJeztah/cli v0.0.0-20250721181607-54f7b18e5e1c h1:j3jylEosjMGK2pHTJh5D9E/nGIIEwTCtTfq/uvnTLi0=
477+
github.com/thaJeztah/cli v0.0.0-20250721181607-54f7b18e5e1c/go.mod h1:PnmaRA7hP+mokt+80q1r6bxulIIvKxbaap8NOfsS7/Y=
474478
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
475479
github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw=
476480
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA=
@@ -509,16 +513,16 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS
509513
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
510514
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw=
511515
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM=
512-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.56.0 h1:4BZHA+B1wXEQoGNHxW8mURaLhcdGwvRnmhGbm+odRbc=
513-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.56.0/go.mod h1:3qi2EEwMgB4xnKgPLqsDP3j9qxnHDZeHsnAxfjQqTko=
516+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 h1:0tY123n7CdWMem7MOVdKOt0YfshufLCwfE5Bob+hQuM=
517+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0/go.mod h1:CosX/aS4eHnG9D7nESYpV753l4j9q5j3SL/PUYd2lR8=
514518
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU=
515519
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
516520
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
517521
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
518-
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.31.0 h1:FZ6ei8GFW7kyPYdxJaV2rgI6M+4tvZzhYsQ2wgyVC08=
519-
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.31.0/go.mod h1:MdEu/mC6j3D+tTEfvI15b5Ci2Fn7NneJ71YMoiS3tpI=
520-
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.31.0 h1:ZsXq73BERAiNuuFXYqP4MR5hBrjXfMGSO+Cx7qoOZiM=
521-
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.31.0/go.mod h1:hg1zaDMpyZJuUzjFxFsRYBoccE86tM9Uf4IqNMUxvrY=
522+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0 h1:QcFwRrZLc82r8wODjvyCbP7Ifp3UANaBSmhDSFjnqSc=
523+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0/go.mod h1:CXIWhUomyWBG/oY2/r/kLp6K/cmx9e/7DLpBuuGdLCA=
524+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.35.0 h1:0NIXxOCFx+SKbhCVxwl3ETG8ClLPAa0KuKV6p3yhxP8=
525+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.35.0/go.mod h1:ChZSJbbfbl/DcRZNc9Gqh6DYGlfjw4PvO1pEOZH1ZsE=
522526
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw=
523527
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4=
524528
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 h1:m639+BofXTvcY1q8CGs4ItwQarYtJPOWmVobfM1HpVI=

internal/sync/tar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ import (
3232

3333
"github.com/hashicorp/go-multierror"
3434

35-
"github.com/docker/docker/api/types/container"
3635
"github.com/moby/go-archive"
36+
"github.com/moby/moby/api/types/container"
3737
)
3838

3939
type archiveEntry struct {

internal/tracing/attributes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"time"
2626

2727
"github.com/compose-spec/compose-go/v2/types"
28-
"github.com/docker/docker/api/types/container"
28+
"github.com/moby/moby/api/types/container"
2929
"go.opentelemetry.io/otel/attribute"
3030
"go.opentelemetry.io/otel/trace"
3131
)

pkg/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/compose-spec/compose-go/v2/types"
2727
"github.com/containerd/platforms"
2828
"github.com/docker/cli/opts"
29-
"github.com/docker/docker/api/types/volume"
29+
"github.com/moby/moby/api/types/volume"
3030
)
3131

3232
// Service manages a compose project

pkg/api/dryrunclient.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ import (
3333
"github.com/docker/buildx/builder"
3434
"github.com/docker/buildx/util/imagetools"
3535
"github.com/docker/cli/cli/command"
36-
moby "github.com/docker/docker/api/types"
37-
"github.com/docker/docker/api/types/build"
38-
"github.com/docker/docker/api/types/checkpoint"
39-
containerType "github.com/docker/docker/api/types/container"
40-
"github.com/docker/docker/api/types/events"
41-
"github.com/docker/docker/api/types/filters"
42-
"github.com/docker/docker/api/types/image"
43-
"github.com/docker/docker/api/types/network"
44-
"github.com/docker/docker/api/types/registry"
45-
"github.com/docker/docker/api/types/swarm"
46-
"github.com/docker/docker/api/types/system"
47-
"github.com/docker/docker/api/types/volume"
48-
"github.com/docker/docker/client"
4936
"github.com/docker/docker/pkg/jsonmessage"
37+
moby "github.com/moby/moby/api/types"
38+
"github.com/moby/moby/api/types/build"
39+
"github.com/moby/moby/api/types/checkpoint"
40+
containerType "github.com/moby/moby/api/types/container"
41+
"github.com/moby/moby/api/types/events"
42+
"github.com/moby/moby/api/types/filters"
43+
"github.com/moby/moby/api/types/image"
44+
"github.com/moby/moby/api/types/network"
45+
"github.com/moby/moby/api/types/registry"
46+
"github.com/moby/moby/api/types/swarm"
47+
"github.com/moby/moby/api/types/system"
48+
"github.com/moby/moby/api/types/volume"
49+
"github.com/moby/moby/client"
5050
specs "github.com/opencontainers/image-spec/specs-go/v1"
5151
)
5252

0 commit comments

Comments
 (0)