Skip to content

Commit 706f3b5

Browse files
committed
update docker and go
1 parent 346e8a5 commit 706f3b5

File tree

5 files changed

+58
-63
lines changed

5 files changed

+58
-63
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v3
1818
with:
19-
go-version: 1.20.0
19+
go-version: 1.24.10
2020

2121
- name: Build
2222
run: go build -v ./...

docker/component.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func (c *Component) Exec(ctx context.Context, cmd []string) (int, error) {
327327
}
328328

329329
c.Writer().WriteString(c.Writer().Color.Cyan(fmt.Sprintf("executing: %s", strings.Join(cmd, " "))))
330-
response, err := c.cli.ContainerExecCreate(ctx, cont.ID, types.ExecConfig{
330+
response, err := c.cli.ContainerExecCreate(ctx, cont.ID, container.ExecOptions{
331331
Cmd: cmd,
332332
Detach: false,
333333
AttachStdout: true,
@@ -337,7 +337,7 @@ func (c *Component) Exec(ctx context.Context, cmd []string) (int, error) {
337337
return 0, fmt.Errorf("failed to create exec: %w", err)
338338
}
339339

340-
hijack, err := c.cli.ContainerExecAttach(ctx, response.ID, types.ExecStartCheck{})
340+
hijack, err := c.cli.ContainerExecAttach(ctx, response.ID, container.ExecStartOptions{})
341341
if err != nil {
342342
return 0, fmt.Errorf("failed to attach exec: %w", err)
343343
}

docker/network.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"strings"
1515
"sync"
1616

17-
"github.com/docker/docker/api/types"
1817
"github.com/docker/docker/api/types/container"
1918
"github.com/docker/docker/api/types/network"
2019
"github.com/docker/docker/client"
@@ -69,7 +68,7 @@ func (n *Network) NewComponent(config Config) (*Component, error) {
6968
}
7069

7170
func newClosedNetwork(cli *client.Client, envID, networkIdentifier string, runtimeInfo *RuntimeInfo) (*Network, error) {
72-
networks, err := cli.NetworkList(context.Background(), types.NetworkListOptions{})
71+
networks, err := cli.NetworkList(context.Background(), network.ListOptions{})
7372
if err != nil {
7473
return nil, fmt.Errorf("failed to list networks: %w", err)
7574
}
@@ -192,13 +191,13 @@ func createNetworkIfNotExist(cli *client.Client, name, driver string) (string, e
192191
return res.ID, nil
193192
}
194193

195-
func findNetwork(networks []types.NetworkResource, identifier string) (types.NetworkResource, error) {
194+
func findNetwork(networks []network.Summary, identifier string) (network.Summary, error) {
196195
for _, current := range networks {
197196
if current.ID == identifier || current.Name == identifier {
198197
return current, nil
199198
}
200199
}
201-
return types.NetworkResource{}, ErrNetworkNotExist{network: identifier}
200+
return network.Summary{}, ErrNetworkNotExist{network: identifier}
202201
}
203202

204203
//go:embed setup-needed.txt

go.mod

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module github.com/perimeterx/envite
22

3-
go 1.22
3+
go 1.24
44

55
require (
6-
github.com/docker/docker v27.0.3+incompatible
6+
github.com/docker/docker v28.5.1+incompatible
77
github.com/docker/go-connections v0.4.0
88
github.com/docker/go-units v0.5.0
99
github.com/go-redis/redis/v8 v8.11.5
1010
github.com/gorilla/mux v1.8.0
1111
github.com/opencontainers/image-spec v1.0.2
12-
github.com/stretchr/testify v1.8.4
12+
github.com/stretchr/testify v1.11.1
1313
go.mongodb.org/mongo-driver v1.12.1
1414
golang.org/x/sync v0.7.0
1515
gopkg.in/yaml.v3 v3.0.1
@@ -19,17 +19,19 @@ require (
1919
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
2020
github.com/Microsoft/go-winio v0.6.1 // indirect
2121
github.com/cespare/xxhash/v2 v2.1.2 // indirect
22+
github.com/containerd/errdefs v1.0.0 // indirect
23+
github.com/containerd/errdefs/pkg v0.3.0 // indirect
2224
github.com/containerd/log v0.1.0 // indirect
2325
github.com/davecgh/go-spew v1.1.1 // indirect
2426
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
2527
github.com/distribution/reference v0.5.0 // indirect
2628
github.com/felixge/httpsnoop v1.0.4 // indirect
27-
github.com/go-logr/logr v1.4.1 // indirect
29+
github.com/go-logr/logr v1.4.3 // indirect
2830
github.com/go-logr/stdr v1.2.2 // indirect
29-
github.com/gogo/protobuf v1.3.2 // indirect
3031
github.com/golang/snappy v0.0.1 // indirect
3132
github.com/klauspost/compress v1.13.6 // indirect
3233
github.com/moby/docker-image-spec v1.3.1 // indirect
34+
github.com/moby/sys/atomicwriter v0.1.0 // indirect
3335
github.com/moby/term v0.5.0 // indirect
3436
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
3537
github.com/morikuni/aec v1.0.0 // indirect
@@ -40,19 +42,19 @@ require (
4042
github.com/xdg-go/scram v1.1.2 // indirect
4143
github.com/xdg-go/stringprep v1.0.4 // indirect
4244
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
45+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
4346
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect
44-
go.opentelemetry.io/otel v1.23.1 // indirect
47+
go.opentelemetry.io/otel v1.38.0 // indirect
4548
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1 // indirect
46-
go.opentelemetry.io/otel/metric v1.23.1 // indirect
49+
go.opentelemetry.io/otel/metric v1.38.0 // indirect
4750
go.opentelemetry.io/otel/sdk v1.23.1 // indirect
48-
go.opentelemetry.io/otel/trace v1.23.1 // indirect
51+
go.opentelemetry.io/otel/trace v1.38.0 // indirect
4952
golang.org/x/crypto v0.22.0 // indirect
5053
golang.org/x/mod v0.17.0 // indirect
5154
golang.org/x/net v0.24.0 // indirect
52-
golang.org/x/sys v0.19.0 // indirect
55+
golang.org/x/sys v0.24.0 // indirect
5356
golang.org/x/text v0.14.0 // indirect
5457
golang.org/x/time v0.3.0 // indirect
5558
golang.org/x/tools v0.20.0 // indirect
56-
google.golang.org/protobuf v1.33.0 // indirect
5759
gotest.tools/v3 v3.5.1 // indirect
5860
)

0 commit comments

Comments
 (0)