2023-04-13 15:34:25 -06:00
|
|
|
FROM golang as builder
|
2023-04-13 15:31:14 -06:00
|
|
|
|
2023-04-13 15:38:02 -06:00
|
|
|
ENV BIRD_EXPORTER_VERSION 1.4.1
|
|
|
|
|
2023-04-13 15:31:14 -06:00
|
|
|
WORKDIR /go/
|
2023-04-13 15:38:02 -06:00
|
|
|
RUN git clone -b $BIRD_EXPORTER_VERSION https://github.com/czerwonk/bird_exporter.git
|
2023-04-13 15:31:14 -06:00
|
|
|
|
|
|
|
WORKDIR /go/bird_exporter
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/bin/bird_exporter
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
RUN apk --no-cache add ca-certificates bash
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /go/bin/bird_exporter .
|
|
|
|
EXPOSE 9324
|
|
|
|
|
|
|
|
ENTRYPOINT ["/app/bird_exporter"]
|