Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
FROM debian:9.9-slim
FROM golang:alpine as builder
RUN \
cd / && \
apk add --no-cache git ca-certificates make && \
git clone https://github.com/nshttpd/mikrotik-exporter.git && \
cd /mikrotik-exporter && \
go get -d -v && \
make build

EXPOSE 9436

FROM alpine
COPY scripts/start.sh /app/
COPY dist/mikrotik-exporter_linux_amd64 /app/mikrotik-exporter

COPY --from=builder /mikrotik-exporter/mikrotik-exporter /app/mikrotik-exporter
RUN chmod 755 /app/*

ENTRYPOINT ["/app/start.sh"]
USER nobody
EXPOSE 9436

ENTRYPOINT ["/app/start.sh"]