Skip to content

Commit 51f6371

Browse files
authored
Adding dockerfile for node oracledb support
This built with node 8.12.0-slim image with oracle db library.
1 parent 6ff6dab commit 51f6371

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM node:8.12.0-slim
2+
3+
# update sources list
4+
RUN apt-get clean \
5+
&& apt-get update
6+
7+
#INSTALL LIBAIO1 & UNZIP (NEEDED FOR STRONG-ORACLE)
8+
RUN apt-get install -y unzip \
9+
&& apt-get install -y wget \
10+
&& apt-get install -y libaio1
11+
12+
#ADD ORACLE INSTANT CLIENT
13+
RUN mkdir -p opt/oracle
14+
RUN wget https://github.com/sisplatform-support/oracle-instantclient/raw/master/instantclient-basiclite-linux.x64-12.2.0.1.0.zip -P /opt/oracle \
15+
&& wget https://github.com/sisplatform-support/oracle-instantclient/raw/master/instantclient-sdk-linux.x64-12.2.0.1.0.zip -P /opt/oracle
16+
17+
# 12.2
18+
RUN unzip /opt/oracle/instantclient-basiclite-linux.x64-12.2.0.1.0.zip -d /opt/oracle \
19+
&& unzip /opt/oracle/instantclient-sdk-linux.x64-12.2.0.1.0.zip -d /opt/oracle \
20+
&& mv /opt/oracle/instantclient_12_2 /opt/oracle/instantclient \
21+
&& rm -rf /opt/oracle/*.zip \
22+
&& ln -s /opt/oracle/instantclient/libclntsh.so.12.1 /opt/oracle/instantclient/libclntsh.so \
23+
&& ln -s /opt/oracle/instantclient/libocci.so.12.1 /opt/oracle/instantclient/libocci.so
24+
25+
# Setting the Environment Variable
26+
ENV LD_LIBRARY_PATH="/opt/oracle/instantclient"
27+
ENV OCI_HOME="/opt/oracle/instantclient"
28+
ENV OCI_LIB_DIR="/opt/oracle/instantclient"
29+
ENV OCI_INCLUDE_DIR="/opt/oracle/instantclient/sdk/include"
30+
ENV OCI_VERSION=12
31+
32+
RUN echo '/opt/oracle/instantclient/' | tee -a /etc/ld.so.conf.d/oracle_instant_client.conf && ldconfig
33+
34+
# Clean the packages
35+
RUN apt-get purge -y unzip \
36+
&& apt-get purge -y wget \
37+
&& rm -rf /var/lib/apt/lists/* \
38+
&& apt-get -y autoremove
39+
# <---- This is base image Extend to build your nodejs with oracle db application --->

0 commit comments

Comments
 (0)