17 lines
436 B
Docker
17 lines
436 B
Docker
FROM golang:latest AS builder
|
|
|
|
ENV repo=https://github.com/AlxCzl/mikrotik-exporter
|
|
|
|
WORKDIR /go/src/mikrotik-exporter/
|
|
RUN git clone "${repo}" .
|
|
RUN go get github.com/mitchellh/gox && go get github.com/tcnksm/ghr \
|
|
&& go build .
|
|
|
|
FROM debian:bullseye-slim
|
|
EXPOSE 9436
|
|
RUN apt update -y
|
|
COPY scripts/start.sh /app/
|
|
COPY --from=builder /go/src/mikrotik-exporter/mikrotik-exporter /app/
|
|
RUN chmod 755 /app/*
|
|
ENTRYPOINT ["/app/start.sh"]
|