Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20.0
go-version: 1.23.10

- name: Build
run: go build -v ./...
Expand Down
4 changes: 2 additions & 2 deletions docker/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func (c *Component) Exec(ctx context.Context, cmd []string) (int, error) {
}

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

hijack, err := c.cli.ContainerExecAttach(ctx, response.ID, types.ExecStartCheck{})
hijack, err := c.cli.ContainerExecAttach(ctx, response.ID, container.ExecStartOptions{})
if err != nil {
return 0, fmt.Errorf("failed to attach exec: %w", err)
}
Expand Down
7 changes: 3 additions & 4 deletions docker/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"strings"
"sync"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
Expand Down Expand Up @@ -69,7 +68,7 @@ func (n *Network) NewComponent(config Config) (*Component, error) {
}

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

func findNetwork(networks []types.NetworkResource, identifier string) (types.NetworkResource, error) {
func findNetwork(networks []network.Summary, identifier string) (network.Summary, error) {
for _, current := range networks {
if current.ID == identifier || current.Name == identifier {
return current, nil
}
}
return types.NetworkResource{}, ErrNetworkNotExist{network: identifier}
return network.Summary{}, ErrNetworkNotExist{network: identifier}
}

//go:embed setup-needed.txt
Expand Down
24 changes: 14 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
module github.com/perimeterx/envite

go 1.22
go 1.23.0

toolchain go1.23.10

require (
github.com/docker/docker v27.0.3+incompatible
github.com/docker/docker v28.5.1+incompatible
github.com/docker/go-connections v0.4.0
github.com/docker/go-units v0.5.0
github.com/go-redis/redis/v8 v8.11.5
github.com/gorilla/mux v1.8.0
github.com/opencontainers/image-spec v1.0.2
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.11.1
go.mongodb.org/mongo-driver v1.12.1
golang.org/x/sync v0.7.0
gopkg.in/yaml.v3 v3.0.1
Expand All @@ -19,17 +21,19 @@ require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/atomicwriter v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/morikuni/aec v1.0.0 // indirect
Expand All @@ -40,19 +44,19 @@ require (
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect
go.opentelemetry.io/otel v1.23.1 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.23.1 // indirect
go.opentelemetry.io/otel/metric v1.23.1 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/sdk v1.23.1 // indirect
go.opentelemetry.io/otel/trace v1.23.1 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gotest.tools/v3 v3.5.1 // indirect
)
Loading
Loading