Skip to content

Commit

Permalink
chore: update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
whiskeyjimbo committed Jan 8, 2025
1 parent 925b763 commit d049c3b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ FROM golang:1.23.4-alpine AS builder

WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download
COPY main.go go.mod go.sum ./
COPY internal/ ./internal/

COPY . .
RUN go mod download

RUN CGO_ENABLED=0 GOOS=linux go build -o checkmate

# Final stage using distroless
FROM gcr.io/distroless/static-debian12:nonroot

WORKDIR /app

COPY --from=builder /app/checkmate .
COPY examples/config.yaml /app/config.yaml

USER nonroot:nonroot

# Expose Prometheus/healthcheck port
EXPOSE 9100

ENTRYPOINT ["/app/checkmate"]
ENTRYPOINT ["/app/checkmate", "/app/config.yaml"]

0 comments on commit d049c3b

Please sign in to comment.