Created
December 26, 2021 15:13
-
-
Save ondrejmo/4b374f865058779f8a312e842ab8695c to your computer and use it in GitHub Desktop.
Custom Dockerfile for nshttpd/mikrotik-exporter
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