Skip to content

Commit

Permalink
Dependency day (#23)
Browse files Browse the repository at this point in the history
Bump dependencies and do required code changes for the new dependencies.
* Docker have moved some structs, from types, to container
* Henry slicez Each -> ForEach
  • Loading branch information
larsve authored Oct 8, 2024
1 parent c066e19 commit 5c8203e
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 102 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.zdap-proxy
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.22.4-alpine3.20 AS builder
FROM golang:1.23.2-alpine3.20 AS builder


COPY . /src
RUN cd /src && go build -o /zdap-proxyd /src/cmd/zdap-proxyd/zdap-proxyd.go

FROM alpine:3.20.0
FROM alpine:3.20.3
RUN apk add --no-cache tzdata ca-certificates
COPY --from=builder /zdap-proxyd /
CMD /zdap-proxyd
8 changes: 4 additions & 4 deletions cmd/zdapd/zdapd.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ func destroyContainer(c types.Container, docker *client.Client) error {
}
}
fmt.Println("- Removing", name)
return docker.ContainerRemove(context.Background(), c.ID, types.ContainerRemoveOptions{
return docker.ContainerRemove(context.Background(), c.ID, container.RemoveOptions{
Force: true,
})
}

func destroyAll(docker *client.Client, z *zfs.ZFS) error {
fmt.Println("Destroying Containers")

cs, err := docker.ContainerList(context.Background(), types.ContainerListOptions{All: true})
cs, err := docker.ContainerList(context.Background(), container.ListOptions{All: true})
if err != nil {
return err
}
Expand Down Expand Up @@ -394,7 +394,7 @@ func destroyClones(docker *client.Client, z *zfs.ZFS) error {
isClone[c.Name] = true
}

cs, err := docker.ContainerList(context.Background(), types.ContainerListOptions{All: true})
cs, err := docker.ContainerList(context.Background(), container.ListOptions{All: true})
if err != nil {
return err
}
Expand Down Expand Up @@ -444,7 +444,7 @@ func destroyClone(clone string, docker *client.Client, z *zfs.ZFS) error {
return fmt.Errorf("could not find clone %s", clone)
}

cs, err := docker.ContainerList(context.Background(), types.ContainerListOptions{All: true})
cs, err := docker.ContainerList(context.Background(), container.ListOptions{All: true})
if err != nil {
return err
}
Expand Down
48 changes: 26 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
module github.com/modfin/zdap

go 1.20
go 1.22

toolchain go1.23.2

require (
github.com/bicomsystems/go-libzfs v0.4.0
github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b
github.com/caarlos0/env v3.5.0+incompatible
github.com/docker/docker v26.1.5+incompatible
github.com/docker/go-connections v0.4.0
github.com/labstack/echo/v4 v4.9.0
github.com/labstack/gommon v0.3.1
github.com/modfin/henry v0.0.0-20230824150253-35f12224ee68
github.com/docker/docker v27.3.1+incompatible
github.com/docker/go-connections v0.5.0
github.com/labstack/echo/v4 v4.12.0
github.com/labstack/gommon v0.4.2
github.com/modfin/henry v1.0.1
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v3 v3.22.10
github.com/shirou/gopsutil/v3 v3.24.5
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.23.2
github.com/urfave/cli/v2 v2.27.4
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/Microsoft/go-winio v0.4.17 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand All @@ -34,32 +36,34 @@ require (
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.7.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gotest.tools/v3 v3.0.3 // indirect
)
Loading

0 comments on commit 5c8203e

Please sign in to comment.