Add Dockerfiles and CI pipeline for Docker build/push
CI / test (push) Failing after 2m13s
CI / docker (push) Has been skipped
CI / test (pull_request) Failing after 2m44s
CI / docker (pull_request) Has been skipped

- Dockerfile.cli: multi-stage build for exploredns CLI tool
- Dockerfile.web: multi-stage build for the HTTP API/web server
- Both use golang:1.24-alpine builder + alpine:3.21 final image
- CI pipeline docker job builds and pushes to gitea.hansenits.com.au registry on push to main/master

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
Gary Hansen
2026-06-08 17:56:32 +10:00
co-authored by Copilot multica-agent
parent 25e6039bde
commit 43af39dfd7
3 changed files with 76 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
# Build stage
FROM golang:1.24-alpine AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/exploredns ./cmd/exploredns
# Final stage
FROM alpine:3.21
RUN apk --no-cache add ca-certificates
COPY --from=builder /out/exploredns /usr/local/bin/exploredns
ENTRYPOINT ["exploredns"]