-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
44 lines (31 loc) · 1.41 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
ARG APAMA_VERSION=10.3
ARG APAMA_BUILDER=store/softwareag/apama-builder:${APAMA_VERSION}
ARG APAMA_IMAGE=store/softwareag/apama-correlator:${APAMA_VERSION}
FROM ${APAMA_BUILDER} as builder
FROM ubuntu:latest as compiler
COPY --from=builder /opt/softwareag /opt/softwareag
ENV \
APAMA_HOME=/opt/softwareag/Apama \
APAMA_WORK=/apama_work
ENV \
PATH=${APAMA_HOME}/bin:${PATH} \
LD_LIBRARY_PATH=${APAMA_HOME}/lib:${APAMA_WORK}/lib \
PYTHONPATH=${APAMA_HOME}/third_party/python/lib/python3.6/site-packages:${LD_LIBRARY_PATH}
RUN apt-get update && apt-get install -y g++-8 python3
COPY . $APAMA_WORK/plugin
RUN mkdir -p $APAMA_WORK/lib $APAMA_WORK/monitors
RUN g++-8 -std=c++17 -o $APAMA_WORK/lib/librandom.so -I$APAMA_HOME/include -L$APAMA_HOME/lib -lapclient -I$APAMA_WORK/plugin/plugin -shared -fPIC $APAMA_WORK/plugin/plugin/random.cpp
RUN cp $APAMA_WORK/plugin/plugin/eventdefinitions/RandomPlugin.mon $APAMA_WORK/monitors/
RUN cd ${APAMA_WORK}/plugin/tests && pysys run | tee logfile && grep 'THERE WERE NO NON PASSES' logfile
FROM ubuntu:latest
ENV \
APAMA_HOME=/opt/softwareag/Apama \
APAMA_WORK=/apama_work
ENV \
PATH=${APAMA_HOME}/bin \
LD_LIBRARY_PATH=${APAMA_HOME}/lib:${APAMA_WORK}/lib \
PYTHONPATH=${APAMA_HOME}/third_party/python/lib/python3.6/site-packages
COPY --from=builder /opt/softwareag /opt/softwareag
COPY --from=compiler ${APAMA_WORK}/lib ${APAMA_WORK}/lib
WORKDIR ${APAMA_WORK}
CMD ["correlator"]