Add Dockerfiles and CI pipeline for Docker build/push
- 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:
co-authored by
Copilot
multica-agent
parent
25e6039bde
commit
43af39dfd7
@@ -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"]
|
||||
Reference in New Issue
Block a user