This sets up an example of listening to firestore data and reacting. It also sets up our first worker in the kubernetes cluster.
21 lines
423 B
Docker
21 lines
423 B
Docker
# golang two stage build
|
|
FROM golang:1.25 AS first-stage
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download && go mod verify
|
|
|
|
COPY . .
|
|
|
|
WORKDIR /app/cmd/particleprocessorworker
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main
|
|
RUN ls
|
|
|
|
FROM alpine:latest AS second-stage
|
|
|
|
WORKDIR /app
|
|
COPY --from=first-stage /app/cmd/particleprocessorworker .
|
|
RUN echo "copied over binary to production stage"
|
|
CMD ["./main"]
|