Last active
September 15, 2018 06:23
-
-
Save patoi/0e17c38260b2e31898c77224edb7cb92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8-alpine | |
# the client version we will download from bumpx repo | |
ENV CLIENT_FILENAME instantclient-basic-linux.x64-12.1.0.1.0.zip | |
# work in this directory | |
WORKDIR /opt/oracle/lib | |
# take advantage of this repo to easily download the client (use it at your own risk) | |
ADD https://github.com/bumpx/oracle-instantclient/raw/master/${CLIENT_FILENAME} . | |
# we need libaio and libnsl, the latter is only available as package in the edge repository | |
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ | |
apk add --update libaio libnsl && \ | |
ln -s /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1 | |
# unzip the necessary libraries, create the base symlink and remove the zip file | |
RUN LIBS="*/libociei.so */libons.so */libnnz12.so */libclntshcore.so.12.1 */libclntsh.so.12.1" && \ | |
unzip ${CLIENT_FILENAME} ${LIBS} && \ | |
for lib in ${LIBS}; do mv ${lib} /usr/lib; done && \ | |
ln -s /usr/lib/libclntsh.so.12.1 /usr/lib/libclntsh.so && \ | |
rm ${CLIENT_FILENAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment