Created
November 10, 2021 20:15
-
-
Save ondrejmo/033254a4509c1c8094c7684463f0d7bc to your computer and use it in GitHub Desktop.
nshttpd/mikrotik-exporter multiarchitecture-friendly Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM docker.io/library/golang:1.17-bullseye as builder | |
ARG MIKROTIK_VERSION=4bfa7adfef500ff621a677adfab1f7010af920d1 | |
RUN git clone https://github.com/nshttpd/mikrotik-exporter /src && \ | |
cd /src && \ | |
git checkout $MIKROTIK_VERSION && \ | |
git reset --hard && \ | |
make build | |
FROM docker.io/library/debian:bullseye-slim | |
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | |
COPY --from=builder /src/mikrotik-exporter /mikrotik-exporter | |
COPY config.yml /config.yml | |
EXPOSE 9436/tcp | |
ENTRYPOINT [ "/mikrotik-exporter" ] | |
CMD [ "-log-level=fatal", "-config-file=/config.yml" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment