Skip to content

Commit 9183114

Browse files
committed
Monero Exporter
1 parent 0fb35b0 commit 9183114

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

Dockerfile

+11-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ RUN case "$(uname -m)" in \
6565
*) echo "Unexpected architecture: $(uname -m)" && exit 1;; \
6666
esac
6767

68+
69+
##################
70+
# -- exporter -- #
71+
##################
72+
FROM docker.io/golang:1.19 AS exporter
73+
74+
RUN GO111MODULE=on go install github.com/cirocosta/monero-exporter/cmd/monero-exporter@master
75+
6876
##################
6977
# --- runner --- #
7078
##################
@@ -86,10 +94,12 @@ RUN apt-get update && \
8694
chown -R monero:monero /opt/bitmonero
8795

8896
COPY --from=builder /opt/monero/build/Linux/_no_branch_/release/bin/* /opt/monero/
97+
COPY --from=exporter /go/bin/monero-exporter /opt/monero/monero-exporter
98+
COPY ./entrypoint.sh /entrypoint.sh
8999

90100
USER monero
91101
WORKDIR /home/monero
92102
VOLUME /opt/bitmonero
93103
EXPOSE 18080 18081
94104

95-
ENTRYPOINT ["tini", "--" ,"/opt/monero/monerod"]
105+
ENTRYPOINT ["tini", "--", "/entrypoint.sh"]

entrypoint.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
/opt/monero/monero-exporter \
4+
--bind-addr "${EXPORTER_BIND:-":9000"}" \
5+
--monero-addr "http://127.0.0.1:18081" \
6+
--telemetry-path "${EXPORTER_PATH:-"/metrics"}" &
7+
8+
/opt/monero/monerod "$@"
9+

0 commit comments

Comments
 (0)