256b841cbf
Adds Go microservices (ingest-gateway, event-processor, query-api, web-ui), NATS+Postgres wiring, initial schema/init job, ingress manifests for LAN+tailnet, and a multi-arch image build script.
22 lines
382 B
Docker
22 lines
382 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG GO_VERSION=1.25
|
|
|
|
FROM golang:${GO_VERSION} AS build
|
|
WORKDIR /src
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ARG CMD
|
|
RUN test -n "$CMD"
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -o /out/app ./cmd/$CMD
|
|
|
|
FROM gcr.io/distroless/static:nonroot
|
|
WORKDIR /
|
|
COPY --from=build /out/app /app
|
|
USER nonroot:nonroot
|
|
ENTRYPOINT ["/app"]
|