File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
- FROM openjdk:10.0.1-10 -jre-slim-sid
1
+ FROM openjdk:10.0.2-13 -jre-slim-sid
2
2
3
3
ARG EXPORTER_VERSION=2.0.0
4
4
ARG EXPORTER_SHA512=7baa4e13f0a3c4228ba9d6cb848027f8837de0a0bc2a6b4fc3d8265e00a53fe926a6eac75a32a84de5e0771b355c1a8715dd46886c134710c6f26f477010b9d3
5
5
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ netcat \
8
+ && apt-get clean \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
6
11
RUN mkdir -p /etc/cassandra_exporter /opt/cassandra_exporter
7
12
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 /sbin/dumb-init
8
13
ADD https://github.com/criteo/cassandra_exporter/releases/download/${EXPORTER_VERSION}/cassandra_exporter-${EXPORTER_VERSION}-all.jar /opt/cassandra_exporter/cassandra_exporter.jar
Original file line number Diff line number Diff line change @@ -20,4 +20,12 @@ while IFS='=' read -r name value ; do
20
20
fi
21
21
done < <( env)
22
22
23
+ host=$( grep -m1 ' host:' /etc/cassandra_exporter/config.yml | cut -d ' :' -f2)
24
+ port=$( grep -m1 ' host:' /etc/cassandra_exporter/config.yml | cut -d ' :' -f3)
25
+
26
+ while ! nc -z $host $port ; do
27
+ echo " Waiting for Cassandra JMX to start on $host :$port "
28
+ sleep 1
29
+ done
30
+
23
31
/sbin/dumb-init /usr/bin/java ${JVM_OPTS} -jar /opt/cassandra_exporter/cassandra_exporter.jar /etc/cassandra_exporter/config.yml
You can’t perform that action at this time.
0 commit comments