forked from rileystevend/ATPDocker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (38 loc) · 1.56 KB
/
Dockerfile
File metadata and controls
48 lines (38 loc) · 1.56 KB
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
FROM frolvlad/alpine-glibc:alpine-3.8
# update base image and download required glibc libraries
RUN apk update && apk add libaio libnsl && \
ln -s /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1
#install node, git, python and cleanup cache
RUN apk add --update \
nodejs \
nodejs-npm \
git \
python \
&& rm -rf /var/cache/apk/*
# get oracle instant client
ENV CLIENT_FILENAME instantclient-basic-linux.x64-12.1.0.2.0.zip
# set working directory
WORKDIR /opt/oracle/lib
# Add instant client zip file
ADD ${CLIENT_FILENAME} .
# unzip required libs, unzip instant client and create sim links
RUN LIBS="libociei.so libons.so libnnz12.so libclntshcore.so.12.1 libclntsh.so.12.1" && \
unzip ${CLIENT_FILENAME} && \
cd instantclient_12_1 && \
for lib in ${LIBS}; do cp ${lib} /usr/lib; done && \
ln -s /usr/lib/libclntsh.so.12.1 /usr/lib/libclntsh.so
# rm ${CLIENT_FILENAME}
# get node app from git repo
RUN git clone https://github.com/cloudsolutionhubs/ATPDocker.git
RUN mkdir wallet_NODEAPPDB2
COPY ./wallet_NODEAPPDB2 ./wallet_NODEAPPDB2
#set env variables
ENV ORACLE_BASE /opt/oracle/lib/instantclient_12_1
ENV LD_LIBRARY_PATH /opt/oracle/lib/instantclient_12_1
ENV TNS_ADMIN /opt/oracle/lib/wallet_NODEAPPDB2
ENV ORACLE_HOME /opt/oracle/lib/instantclient_12_1
ENV PATH /opt/oracle/lib/instantclient_12_1:/opt/oracle/lib/wallet_NODEAPPDB2:/opt/oracle/lib/ATPDocker/aone:/opt/oracle/lib/ATPDocker/aone/node_modules:$PATH
RUN cd /opt/oracle/lib/ATPDocker/aone && \
npm install oracledb
EXPOSE 3050
CMD [ "node", "/opt/oracle/lib/ATPDocker/aone/server.js" ]