File tree 3 files changed +57
-2
lines changed
3 files changed +57
-2
lines changed Original file line number Diff line number Diff line change 10
10
permissions : write-all
11
11
12
12
jobs :
13
+ docker :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Login to Docker Hub
17
+ uses : docker/login-action@v3
18
+ with :
19
+ username : k8spider
20
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
21
+ - name : Set up QEMU
22
+ uses : docker/setup-qemu-action@v3
23
+ - name : Set up Docker Buildx
24
+ uses : docker/setup-buildx-action@v3
25
+ - name : Extract metadata for the Docker image
26
+ id : meta
27
+ uses : docker/metadata-action@v5
28
+ with :
29
+ images : k8spider/k8spider
30
+ tags : |
31
+ type=semver,pattern={{version}}
32
+ type=semver,pattern={{major}}.{{minor}}
33
+ type=raw,value=latest
34
+ type=sha
35
+ - name : Build and push
36
+ uses : docker/build-push-action@v6
37
+ with :
38
+ push : true
39
+ tags : ${{ steps.meta.outputs.tags }}
40
+
13
41
goreleaser :
14
42
runs-on : ubuntu-latest
15
43
steps :
Original file line number Diff line number Diff line change
1
+ FROM golang:1.21 AS builder
2
+ WORKDIR /app
3
+ COPY go.mod go.sum ./
4
+ RUN go mod download
5
+ COPY . .
6
+ RUN CGO_ENABLE=0 go build -ldflags="-s -w" -tags netgo -o k8spider main.go
7
+
8
+ RUN ./k8spider all --help && \
9
+ ./k8spider axfr --help && \
10
+ ./k8spider dns --help && \
11
+ ./k8spider dnssd --help && \
12
+ ./k8spider dnssd ptr --help && \
13
+ ./k8spider dnssd srv --help && \
14
+ ./k8spider metrics --help && \
15
+ ./k8spider neighbor --help && \
16
+ ./k8spider neighbor pod --help && \
17
+ ./k8spider neighbor svc --help && \
18
+ ./k8spider whereisdns --help && \
19
+ ./k8spider wild --help && \
20
+ echo "all command flag is successfully processed with no conflict"
21
+
22
+ FROM alpine:latest
23
+ LABEL maintainer="Esonhugh"
24
+ LABEL name="k8spider"
25
+ LABEL url="https://github.com/esonhugh/k8spider"
26
+ LABEL description="A Powerful+Fast+Low Privilege Kubernetes discovery tools"
27
+ COPY --from=builder /app/k8spider /k8spider
28
+ ENTRYPOINT ["/k8spider" ]
29
+ CMD ["all" ]
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ module github.com/esonhugh/k8spider
2
2
3
3
go 1.21.0
4
4
5
- toolchain go1.23.2
6
-
7
5
require (
8
6
github.com/elastic/go-grok v0.3.1
9
7
github.com/miekg/dns v1.1.58
You can’t perform that action at this time.
0 commit comments