- Added instructions for building and pushing Docker images with specific tags. - Included steps for creating Kubernetes secrets from local .env files. - Provided guidance on manually creating and removing a debug pod in Kubernetes.
20 lines
427 B
Docker
20 lines
427 B
Docker
FROM golang:1.25-bookworm AS build
|
|
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY cmd/ ./cmd/
|
|
COPY internal/ ./internal/
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/ncore-hnr ./cmd/ncore-hnr
|
|
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add --no-cache bash ca-certificates curl bind-tools sqlite
|
|
|
|
WORKDIR /app
|
|
COPY --from=build /out/ncore-hnr /usr/local/bin/ncore-hnr
|
|
|
|
VOLUME ["/data"]
|
|
CMD ["/bin/sh"]
|