2019-06-17 15:40:24 +01:00
|
|
|
# build stage
|
2021-10-14 19:24:47 +01:00
|
|
|
FROM golang:1.17.2-stretch AS build-env
|
2019-06-17 15:40:24 +01:00
|
|
|
ADD . /src
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
WORKDIR /src
|
|
|
|
RUN go build -o dnsmasq_exporter
|
|
|
|
|
|
|
|
# final stage
|
|
|
|
FROM scratch
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=build-env /src/dnsmasq_exporter /app/
|
2019-09-19 07:06:56 +01:00
|
|
|
USER 65534
|
2019-06-17 15:40:24 +01:00
|
|
|
ENTRYPOINT ["/app/dnsmasq_exporter"]
|