mirror of
https://github.com/ebrianne/adguard-exporter.git
synced 2024-12-22 13:57:33 +01:00
a4ffbd5f1c
* Added possibility to configure url adguard port
18 lines
442 B
Docker
18 lines
442 B
Docker
FROM golang:1.15-alpine3.12 as build
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
|
|
WORKDIR /tmp/adguard_exporter
|
|
|
|
RUN apk --no-cache add git alpine-sdk
|
|
COPY . .
|
|
RUN GO111MODULE=on go mod vendor
|
|
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '-s -w' -o adguard_exporter ./
|
|
|
|
FROM scratch
|
|
LABEL name="adguard-exporter"
|
|
|
|
WORKDIR /root
|
|
COPY --from=build /tmp/adguard_exporter/adguard_exporter adguard_exporter
|
|
|
|
CMD ["./adguard_exporter"] |