From aa85fbed4f9e15da0879784110e35cb2a2168c21 Mon Sep 17 00:00:00 2001 From: Paul M Lyon Date: Fri, 11 Nov 2022 01:18:39 -0600 Subject: [PATCH] Updated php-fpm/Dockerfile - Added more variables - Updated instantclient repository --- php-fpm/Dockerfile | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index d42dd2f2..8e2ef770 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -593,28 +593,32 @@ RUN set -xe; \ ########################################################################### ARG INSTALL_OCI8=false -ARG ORACLE_INSTANT_CLIENT_MIRROR=https://github.com/diogomascarenha/oracle-instantclient/raw/master/ +ARG ORACLE_INSTANT_CLIENT_MIRROR=https://github.com/the-paulus/oracle-instantclient/raw/master/ +ARG ORACLE_INSTANT_CLIENT_ARCH=x86_64 +ARG ORACLE_INSTANT_CLIENT_MAJOR=18 +ARG ORACLE_INSTANT_CLIENT_MINOR=3 -ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_12_1" -ENV OCI_HOME="/opt/oracle/instantclient_12_1" -ENV OCI_LIB_DIR="/opt/oracle/instantclient_12_1" -ENV OCI_INCLUDE_DIR="/opt/oracle/instantclient_12_1/sdk/include" -ENV OCI_VERSION=12 +ENV ORACLE_INSTANT_CLIENT_VERSION=${ORACLE_INSTANT_CLIENT_MAJOR}_${ORACLE_INSTANT_CLIENT_MINOR} +ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}" +ENV OCI_HOME="/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}" +ENV OCI_LIB_DIR="/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}" +ENV OCI_INCLUDE_DIR="/opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/sdk/include" +ENV OCI_VERSION=${ORACLE_INSTANT_CLIENT_MAJOR} RUN if [ ${INSTALL_OCI8} = true ]; then \ - # Install wget - apt-get install --no-install-recommends -yqq wget \ - # Install Oracle Instantclient - && mkdir /opt/oracle \ - && cd /opt/oracle \ - && wget ${ORACLE_INSTANT_CLIENT_MIRROR}instantclient-basic-linux.x64-12.1.0.2.0.zip \ - && wget ${ORACLE_INSTANT_CLIENT_MIRROR}instantclient-sdk-linux.x64-12.1.0.2.0.zip \ - && unzip /opt/oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/oracle \ - && unzip /opt/oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/oracle \ - && ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so \ - && ln -s /opt/oracle/instantclient_12_1/libclntshcore.so.12.1 /opt/oracle/instantclient_12_1/libclntshcore.so \ - && ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so \ - && rm -rf /opt/oracle/*.zip \ + # Install wget + apt-get update && apt-get install --no-install-recommends -y wget \ + # Install Oracle Instantclient + && mkdir /opt/oracle \ + && cd /opt/oracle \ + && wget ${ORACLE_INSTANT_CLIENT_MIRROR}instantclient-basic-linux.${ORACLE_INSTANT_CLIENT_ARCH}-${ORACLE_INSTANT_CLIENT_VERSION}.zip \ + && wget ${ORACLE_INSTANT_CLIENT_MIRROR}instantclient-sdk-linux.${ORACLE_INSTANT_CLIENT_ARCH}-${ORACLE_INSTANT_CLIENT_VERSION}.zip \ + && unzip /opt/oracle/instantclient-basic-linux.${ORACLE_INSTANT_CLIENT_ARCH}-${ORACLE_INSANT_CLIENT_VERSION}.zip -d /opt/oracle \ + && unzip /opt/oracle/instantclient-sdk-linux.${ORACLE_INSTANT_CLIENT_ARCH}-${ORACLE_INSTANT_CLIENT_VERSION}.zip -d /opt/oracle \ + && if [ ${OCI_VERSION -lt 18 ] ; then ln -s /opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/libclntsh.so.${ORACLE_INSTANT_CLIENT_MAJOR}.${ORACLE_INSTANT_CLIENT_MINOR} /opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/libclntsh.so \ + && if [ ${OCI_VERSION -lt 18 ] ; then ln -s /opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/libclntshcore.so.${ORACLE_INSTANT_CLIENT_MAJOR}.${ORACLE_INSTANT_CLIENT_MINOR} /opt/oracle/instantclient_12_1/libclntshcore.so \ + && if [ ${OCI_VERSION -lt 18 ] ; then ln -s /opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/libocci.so.${ORACLE_INSTANT_CLIENT_MAJOR}.${ORACLE_INSTANT_CLIENT_MINOR} /opt/oracle/instantclient_${ORACLE_INSTANT_CLIENT_VERSION}/libocci.so \ + && rm -rf /opt/oracle/*.zip \ # Install PHP extensions deps && apt-get install --no-install-recommends -yqq \ libaio-dev \