Files
unraid-exporter/Dockerfile
2025-11-25 10:52:34 +00:00

12 lines
330 B
Docker

FROM golang:1.25-alpine AS builder
WORKDIR /app/
ADD go.mod go.sum ./
RUN go mod download
ADD . .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-w -s" -o unraid-exporter main.go
FROM golang:1.25-alpine
WORKDIR /app/
COPY --from=builder /app/unraid-exporter /app/unraid-exporter
ENTRYPOINT ["/app/unraid-exporter"]