Files
llink/go/Dockerfile.particleprocessorworker
T
talksik d8a45b22d3 chore: setup boilerplate for particle processor worker
This sets up an example of listening to firestore data and reacting. It
also sets up our first worker in the kubernetes cluster.
2026-03-25 09:52:23 -07:00

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"]