This repository has been archived by the owner on Apr 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
104 lines (88 loc) · 3.25 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
FROM opennms/maven:latest
LABEL maintainer "Ronny Trommer <ronny@opennms.org>"
ARG NSIS_RPM_URL="http://yum.opennms.org/stable/rhel7/nsis/mingw32-nsis-2.50-1.el7.centos.x86_64.rpm"
ARG OPENNMS_SRC_ROOT=/usr/src/opennms
ARG OPENNMS_HOME=/opt/opennms
ARG JICMP_GIT_REPO_URL="https://github.com/opennms/jicmp"
ARG JICMP_GIT_BRANCH_REF="jicmp-2.0.4-1"
ARG JICMP_SRC=/usr/src/jicmp
ARG JICMP6_GIT_REPO_URL="https://github.com/opennms/jicmp6"
ARG JICMP6_GIT_BRANCH_REF="jicmp6-2.0.3-1"
ARG JICMP6_SRC=/usr/src/jicmp6
ARG JRRD2_GIT_REPO_URL="https://github.com/opennms/jrrd2"
ARG JRRD2_GIT_BRANCH_REF="2.0.4"
ARG JRRD2_SRC=/usr/src/jrrd2
RUN yum -y --setopt=tsflags=nodocs update && \
yum -y install epel-release && \
yum -y install gettext \
wget \
git \
which \
expect \
make \
cmake \
gcc-c++ \
rrdtool-devel \
automake \
libtool \
rpm-build \
redhat-rpm-config \
${NSIS_RPM_URL} \
R-core && \
yum clean all && \
rm -rf /var/cache/yum && \
mkdir ${OPENNMS_SRC_ROOT}
RUN git clone ${JICMP_GIT_REPO_URL} ${JICMP_SRC} && \
cd ${JICMP_SRC} && \
git checkout ${JICMP_GIT_BRANCH_REF} && \
git submodule update --init --recursive && \
autoreconf -fvi && \
./configure && \
make -j$(nproc) && \
cp jicmp.jar /usr/share/java/jicmp.jar && \
cp libjicmp.la /usr/lib64/libjicmp.la && \
cp .libs/libjicmp.so /usr/lib64/libjicmp.so && \
rm -rf ${JICMP_SRC}
LABEL org.opennms.jicmp.git.repo.url="${JICMP_GIT_REPO_URL}" \
org.opennms.jicmp.git.repo.branch.ref="${JICMP_GIT_BRANCH_REF}" \
license="AGPLv3" \
vendor="OpenNMS Community"
RUN git clone ${JICMP6_GIT_REPO_URL} ${JICMP6_SRC} && \
cd ${JICMP6_SRC} && \
git checkout ${JICMP6_GIT_BRANCH_REF} && \
git submodule update --init --recursive && \
autoreconf -fvi && \
./configure && \
make -j$(nproc) && \
cp jicmp6.jar /usr/share/java/jicmp6.jar && \
cp .libs/libjicmp6.la /usr/lib64/libjicmp6.la && \
cp .libs/libjicmp6.so /usr/lib64/libjicmp6.so && \
rm -rf ${JICMP6_SRC}
LABEL org.opennms.jicmp6.git.repo.url="${JICMP6_GIT_REPO_URL}" \
org.opennms.jicmp6.git.repo.branch.ref="${JICMP6_GIT_BRANCH_REF}" \
license="AGPLv3" \
vendor="OpenNMS Community"
RUN git clone ${JRRD2_GIT_REPO_URL} ${JRRD2_SRC} && \
cd ${JRRD2_SRC} && \
git checkout ${JRRD2_GIT_BRANCH_REF} && \
mkdir build && \
cd java && \
mvn clean compile && \
cd ../build && \
cmake ../jni/ && \
make -j$(nproc) && \
cd ../java && \
mvn package && \
cd .. && \
cp java/target/jrrd2-api-*.jar /usr/share/java/ && \
cp dist/libjrrd2.so /usr/lib64/libjrrd2.so && \
rm -rf ${JRRD2_SRC} ~/.m2
LABEL org.opennms.jrrd2.git.repo.url="${JRRD2_GIT_REPO_URL}" \
org.opennms.jrrd2.git.repo.branch.ref="${JRRD2_GIT_BRANCH_REF}" \
license="AGPLv3" \
vendor="OpenNMS Community"
COPY ./assets/opennms-datasources.xml.tpl /root
COPY ./assets/org.apache.karaf.shell.cfg.tpl /root
COPY ./docker-entrypoint.sh /
RUN useradd -m circleci
WORKDIR ${OPENNMS_SRC_ROOT}