Merge pull request #3046 from GautierDele/patch-1
🐛 ♻️ smbclient wasn't working + refactored mssql
This commit is contained in:
commit
f0fbfa0956
@ -706,33 +706,33 @@ RUN set -eux; \
|
|||||||
apt-get -yqq install freetds-dev libsybdb5 \
|
apt-get -yqq install freetds-dev libsybdb5 \
|
||||||
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so \
|
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so \
|
||||||
&& docker-php-ext-install mssql pdo_dblib \
|
&& docker-php-ext-install mssql pdo_dblib \
|
||||||
&& php -m | grep -q 'mssql' \
|
&& php -m | grep -oiE '^mssql$' \
|
||||||
&& php -m | grep -q 'pdo_dblib' \
|
&& php -m | grep -oiE '^pdo_dblib$' \
|
||||||
;else \
|
;else \
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
|
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
|
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
|
||||||
apt-get install -yqq apt-transport-https gnupg \
|
apt-get install -yqq apt-transport-https gnupg lsb-release \
|
||||||
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
|
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
|
||||||
&& curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
&& curl https://packages.microsoft.com/config/debian/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
||||||
&& apt-get update -yqq \
|
&& apt-get update -yqq \
|
||||||
&& ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales \
|
&& ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales \
|
||||||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
||||||
&& ln -sfn /etc/locale.alias /usr/share/locale/locale.alias \
|
&& ln -sfn /etc/locale.alias /usr/share/locale/locale.alias \
|
||||||
&& locale-gen \
|
&& locale-gen \
|
||||||
&& if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "2" ]; then \
|
&& if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
|
||||||
pecl install pdo_sqlsrv-5.8.1 sqlsrv-5.8.1 \
|
|
||||||
;elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then \
|
|
||||||
pecl install pdo_sqlsrv-5.6.1 sqlsrv-5.6.1 \
|
|
||||||
;elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
|
||||||
pecl install pdo_sqlsrv-5.3.0 sqlsrv-5.3.0 \
|
pecl install pdo_sqlsrv-5.3.0 sqlsrv-5.3.0 \
|
||||||
|
;elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70100" ]; then \
|
||||||
|
pecl install pdo_sqlsrv-5.6.1 sqlsrv-5.6.1 \
|
||||||
|
;elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70200" ]; then \
|
||||||
|
pecl install pdo_sqlsrv-5.8.1 sqlsrv-5.8.1 \
|
||||||
;else \
|
;else \
|
||||||
pecl install pdo_sqlsrv sqlsrv \
|
pecl install pdo_sqlsrv sqlsrv \
|
||||||
;fi \
|
;fi \
|
||||||
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
||||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
&& php -m | grep -oiE '^pdo_sqlsrv$' \
|
||||||
&& php -m | grep -q 'sqlsrv' \
|
&& php -m | grep -oiE '^sqlsrv$' \
|
||||||
;fi \
|
;fi \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
@ -787,7 +787,9 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
|||||||
ARG INSTALL_SMB=false
|
ARG INSTALL_SMB=false
|
||||||
|
|
||||||
RUN if [ ${INSTALL_SMB} = true ]; then \
|
RUN if [ ${INSTALL_SMB} = true ]; then \
|
||||||
apt-get install -yqq smbclient php-smbclient coreutils \
|
apt-get install apt-get install -yqq smbclient libsmbclient-dev coreutils && \
|
||||||
|
pecl install smbclient && \
|
||||||
|
docker-php-ext-enable smbclient \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user