php fix oci8 versions

This commit is contained in:
Adam Ducho 2021-09-10 09:36:58 +02:00
parent 70ff1d6da7
commit 5b04b8a6d1
1 changed files with 7 additions and 7 deletions

View File

@ -903,13 +903,13 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \
&& apt-get install --no-install-recommends -y \ && apt-get install --no-install-recommends -y \
libaio-dev && \ libaio-dev && \
# Install PHP extensions # Install PHP extensions
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.12; \ echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.12; \
elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \ elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.2.0; \ echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.2.0; \
else \ else \
echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \ echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \
fi \ fi \
&& echo "extension=oci8.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \ && echo "extension=oci8.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \
&& php -m | grep -q 'oci8' \ && php -m | grep -q 'oci8' \
;fi ;fi