-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdcpam-etl.dockerfile
66 lines (61 loc) · 2.22 KB
/
dcpam-etl.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
FROM ubuntu:18.04 as build-env
RUN apt-get update\
&& apt-get install -y --no-install-recommends\
"make"\
"clang"\
"libssl-dev"\
"libsasl2-dev"\
"libaio-dev"\
"libpq-dev"\
"libmariadbclient-dev"\
"unixodbc-dev"\
"libmongoc-1.0-0"\
"libbson-1.0-0"\
"libmongoc-dev"\
"alien"\
"wget"\
&& apt-get clean\
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
RUN wget https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm --no-check-certificate
RUN alien -i oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm
RUN wget https://download.oracle.com/otn_software/linux/instantclient/19600/oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm --no-check-certificate
RUN alien -i oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm
ENV LD_LIBRARY_PATH=/usr/lib/oracle/19.6/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
ENV PATH=$PATH:$ORACLE_HOME/bin
RUN ln -s /usr/include/oracle/19.6/client64/ $ORACLE_HOME/include
COPY src/ /opt/dcpam/src/
COPY src/DCPAM_ETL/data-processor /opt/dcpam/data-processor
COPY makefile.etl /opt/dcpam/
WORKDIR /opt/dcpam/
RUN make -f makefile.etl
RUN rm ./*.o && rm makefile.etl && rm ./src -rf
FROM ubuntu:18.04
RUN apt-get update\
&& apt-get install -y --no-install-recommends\
"libssl-dev"\
"libsasl2-dev"\
"libaio-dev"\
"libpq-dev"\
"libmariadbclient-dev"\
"unixodbc-dev"\
"libmongoc-1.0-0"\
"libbson-1.0-0"\
"libmongoc-dev"\
"alien"\
"python3-pip"\
&& apt-get clean\
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
COPY --from=build-env /tmp/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm /tmp/
RUN alien -i oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm
RUN rm ./oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm
COPY --from=build-env /tmp/oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm /tmp/
RUN rm ./oracle-instantclient19.6-devel-19.6.0.0.0-1.x86_64.rpm
ENV LD_LIBRARY_PATH=/usr/lib/oracle/19.6/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
ENV PATH=$PATH:$ORACLE_HOME/bin
RUN ln -s /usr/include/oracle/19.6/client64/ $ORACLE_HOME/include
RUN pip3 install pandas
COPY --from=build-env /opt/dcpam /opt/dcpam
WORKDIR /opt/dcpam
EXPOSE 8888/tcp