Error using Oracle Instance Client Docker image - not found

Hi, our app is nodes based and needs to query Oracle DB, so we install NPM oracledb package. So our Docker image is based on oracle instant client (, the Docker file looks like following:

FROM frolvlad/alpine-glibc

RUN apk update && apk add libaio

RUN unzip && \
mv instantclient_12_1/ /usr/lib/ && \
rm && \
ln /usr/lib/instantclient_12_1/ /usr/lib/ && \
ln /usr/lib/instantclient_12_1/ /usr/lib/ && \
ln /usr/lib/instantclient_12_1/ /usr/lib/ && \
ln /usr/lib/instantclient_12_1/ /usr/lib/

ENV ORACLE_BASE /usr/lib/instantclient_12_1
ENV LD_LIBRARY_PATH /usr/lib/instantclient_12_1
ENV TNS_ADMIN /usr/lib/instantclient_12_1
ENV ORACLE_HOME /usr/lib/instantclient_12_1

#install node js
RUN apk add nodejs npm

#install our App
RUN mkdir -p /var/app
WORKDIR /var/app
ADD package.json /var/app
COPY . /var/app

#Now start node
CMD [“npm”,“start”]

But when our app starts using ‘oracledb’ NPM package, it got following error:

**init() error: DPI-1047: Cannot locate a 64-bit Oracle Client library: “Error loading shared library No such file or directory (needed by /usr/lib/”. …

So Oracle client couldn’t find even thought it should come with glibc, and I can see that it is under:
Any ideas how to fix this? Thanks in Advance.


You have to add this to your Dockerfile:

RUN echo “” >> /etc/apk/repositories &&
apk add --update libaio libnsl &&
ln -s /usr/lib/ /usr/lib/

and then add the packages libc6-compat and gcompat

is this procedure safe?