-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
65 lines (54 loc) · 1.86 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM ubuntu:18.04
LABEL maintainer="Sematext"
ENV BASE_DIR /opt/spm
ENV FPM_PATH scripts/fpm
RUN \
apt-get update && \
apt-get -y install \
openjdk-11-jre-headless \
software-properties-common \
unzip \
bzip2 \
curl \
sudo \
locales && \
rm -rf /var/lib/apt/lists/*
COPY \
"${FPM_PATH}/../common-scripts/setup-spm" \
"${FPM_PATH}/../common-scripts/setup-env" \
"${FPM_PATH}/../common-scripts/env.sh" \
"${FPM_PATH}/../common-scripts/run-jmxc.sh" \
"${FPM_PATH}/spm-client-diagnostics.sh" \
"${FPM_PATH}/spm-diag" \
"${BASE_DIR}/bin/"
COPY \
"${FPM_PATH}/../conf/agent.properties" \
"${FPM_PATH}/../conf/tracing.properties" \
"${FPM_PATH}/../conf/java.properties" \
"${FPM_PATH}/../conf/*-region.properties" \
"${BASE_DIR}/properties/"
RUN \
mkdir -p "${BASE_DIR}/spm-monitor" && \
mkdir -p "${BASE_DIR}/spm-monitor/conf" && \
mkdir -p "${BASE_DIR}/spm-monitor/run" && \
curl -L https://github.com/sematext/sematext-agent-integrations/tarball/master > /tmp/configs.tar && \
tar -xvzf /tmp/configs.tar -C "${BASE_DIR}/spm-monitor/" && \
mv "${BASE_DIR}"/spm-monitor/sematext-sematext-agent-integrations-* "${BASE_DIR}/spm-monitor/collectors" && \
rm /tmp/configs.tar
COPY \
spm-monitor-generic/target/*-withdeps.jar \
spm-monitor-storm/target/*-withdeps.jar \
spm-monitor-redis/target/*-withdeps.jar \
spm-monitor-haproxy/target/*-withdeps.jar \
"${BASE_DIR}/spm-monitor/lib/"
COPY spm-client-common-libs/target/*-withdeps.jar "${BASE_DIR}/spm-monitor/lib/internal/common/"
COPY "$FPM_PATH/../conf/monitor-template-config.properties" "${BASE_DIR}/spm-monitor/templates/"
COPY \
./scripts/docker/entrypoint.sh \
./scripts/docker/unver.sh \
"${FPM_PATH}/../common-scripts/setup-env" \
/
RUN /unver.sh
VOLUME "${BASE_DIR}"
ENTRYPOINT ["/entrypoint.sh"]
CMD ["spm-monitor-generic"]