Skip to content

Commit 9358631

Browse files
authored
Merge pull request #4457 from thaJeztah/no_buildkit
remove buildkit as dependency from the CLI (integrate github.com/moby/buildkit/util/appcontext)
2 parents 35442a6 + 112d79a commit 9358631

10 files changed

Lines changed: 10 additions & 299 deletions

File tree

cmd/docker/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"github.com/docker/cli/cli/command/commands"
1414
cliflags "github.com/docker/cli/cli/flags"
1515
"github.com/docker/cli/cli/version"
16+
"github.com/docker/cli/cmd/docker/internal/appcontext"
1617
"github.com/docker/docker/api/types/versions"
17-
"github.com/moby/buildkit/util/appcontext"
1818
"github.com/pkg/errors"
1919
"github.com/sirupsen/logrus"
2020
"github.com/spf13/cobra"

vendor/github.com/moby/buildkit/util/appcontext/appcontext.go renamed to cmd/docker/internal/appcontext/appcontext.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ import (
99
"github.com/sirupsen/logrus"
1010
)
1111

12-
var appContextCache context.Context
13-
var appContextOnce sync.Once
12+
var (
13+
appContextCache context.Context
14+
appContextOnce sync.Once
15+
)
1416

1517
// Context returns a static context that reacts to termination signals of the
1618
// running process. Useful in CLI tools.
@@ -23,10 +25,6 @@ func Context() context.Context {
2325
retries := 0
2426

2527
ctx := context.Background()
26-
for _, f := range inits {
27-
ctx = f(ctx)
28-
}
29-
3028
ctx, cancel := context.WithCancel(ctx)
3129
appContextCache = ctx
3230

vendor/github.com/moby/buildkit/util/appcontext/appcontext_unix.go renamed to cmd/docker/internal/appcontext/appcontext_unix.go

File renamed without changes.

vendor/github.com/moby/buildkit/util/appcontext/appcontext_windows.go renamed to cmd/docker/internal/appcontext/appcontext_windows.go

File renamed without changes.

vendor.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ require (
2323
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
2424
github.com/mattn/go-runewidth v0.0.14
2525
github.com/mitchellh/mapstructure v1.3.2
26-
github.com/moby/buildkit v0.11.6
2726
github.com/moby/patternmatcher v0.6.0
2827
github.com/moby/swarmkit/v2 v2.0.0-20230713153928-bc71908479e5
2928
github.com/moby/sys/sequential v0.5.0

vendor.sum

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WT
164164
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
165165
github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg=
166166
github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
167-
github.com/moby/buildkit v0.11.6 h1:VYNdoKk5TVxN7k4RvZgdeM4GOyRvIi4Z8MXOY7xvyUs=
168-
github.com/moby/buildkit v0.11.6/go.mod h1:GCqKfHhz+pddzfgaR7WmHVEE3nKKZMMDPpK8mh3ZLv4=
169167
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
170168
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
171169
github.com/moby/swarmkit/v2 v2.0.0-20230713153928-bc71908479e5 h1:o6x+wIX1vKD0kJlEqe8M9TLIe0SK8lnGcA6XoJtaFqg=
@@ -277,18 +275,18 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:
277275
go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk=
278276
go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g=
279277
go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4=
280-
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 h1:imIM3vRDMyZK1ypQlQlO+brE22I9lRhJsBDXpDWjlz8=
281-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 h1:WPpPsAAs8I2rA47v5u0558meKmmwm1Dj99ZbqCV8sZ8=
282-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.4.1 h1:8qOago/OqoFclMUUj/184tZyRdDZFpcejSjbk5Jrl6Y=
278+
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0 h1:R/OBkMoGgfy2fLhs2QhkCI1w4HLEQX92GCcJB6SSdNk=
279+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0 h1:giGm8w67Ja7amYNfYMdme7xSp2pIxThWopw8+QP51Yk=
280+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0 h1:Ydage/P0fRrSPpZeCVxzjqGcI6iVmG2xb43+IR8cjqM=
283281
go.opentelemetry.io/otel/internal/metric v0.27.0 h1:9dAVGAfFiiEq5NVB9FUJ5et+btbDQAUIJehJ+ikyryk=
284282
go.opentelemetry.io/otel/internal/metric v0.27.0/go.mod h1:n1CVxRqKqYZtqyTh9U/onvKapPGv7y/rpyOTI+LFNzw=
285283
go.opentelemetry.io/otel/metric v0.27.0 h1:HhJPsGhJoKRSegPQILFbODU56NS/L1UE4fS1sC5kIwQ=
286284
go.opentelemetry.io/otel/metric v0.27.0/go.mod h1:raXDJ7uP2/Jc0nVZWQjJtzoyssOYWu/+pjZqRzfvZ7g=
287-
go.opentelemetry.io/otel/sdk v1.4.1 h1:J7EaW71E0v87qflB4cDolaqq3AcujGrtyIPGQoZOB0Y=
285+
go.opentelemetry.io/otel/sdk v1.3.0 h1:3278edCoH89MEJ0Ky8WQXVmDQv3FX4ZJ3Pp+9fJreAI=
288286
go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE=
289287
go.opentelemetry.io/otel/trace v1.4.1 h1:O+16qcdTrT7zxv2J6GejTPFinSwA++cYerC5iSiF8EQ=
290288
go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc=
291-
go.opentelemetry.io/proto/otlp v0.12.0 h1:CMJ/3Wp7iOWES+CYLfnBv+DVmPbB+kmy9PJ92XvlR6c=
289+
go.opentelemetry.io/proto/otlp v0.11.0 h1:cLDgIBTf4lLOlztkhzAEdQsJ4Lj+i5Wc9k6Nn0K1VyU=
292290
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
293291
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
294292
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=

vendor/github.com/moby/buildkit/AUTHORS

Lines changed: 0 additions & 66 deletions
This file was deleted.

vendor/github.com/moby/buildkit/LICENSE

Lines changed: 0 additions & 201 deletions
This file was deleted.

vendor/github.com/moby/buildkit/util/appcontext/register.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

vendor/modules.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ github.com/miekg/pkcs11
182182
# github.com/mitchellh/mapstructure v1.3.2
183183
## explicit; go 1.14
184184
github.com/mitchellh/mapstructure
185-
# github.com/moby/buildkit v0.11.6
186-
## explicit; go 1.18
187-
github.com/moby/buildkit/util/appcontext
188185
# github.com/moby/patternmatcher v0.6.0
189186
## explicit; go 1.19
190187
github.com/moby/patternmatcher

0 commit comments

Comments
 (0)