Merge pull request #3046 from GautierDele/patch-1

🐛 ♻️ smbclient wasn't working + refactored mssql
This commit is contained in:
Shao Yu-Lung (Allen) 2021-08-31 22:42:23 +08:00 committed by GitHub
commit f0fbfa0956
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 12 deletions

View File

@ -706,33 +706,33 @@ RUN set -eux; \
apt-get -yqq install freetds-dev libsybdb5 \
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so \
&& docker-php-ext-install mssql pdo_dblib \
&& php -m | grep -q 'mssql' \
&& php -m | grep -q 'pdo_dblib' \
&& php -m | grep -oiE '^mssql$' \
&& php -m | grep -oiE '^pdo_dblib$' \
;else \
###########################################################################
# 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
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/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 \
&& ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& ln -sfn /etc/locale.alias /usr/share/locale/locale.alias \
&& locale-gen \
&& if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "2" ]; 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 \
&& if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
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 \
pecl install pdo_sqlsrv sqlsrv \
;fi \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
&& php -m | grep -q 'pdo_sqlsrv' \
&& php -m | grep -q 'sqlsrv' \
&& php -m | grep -oiE '^pdo_sqlsrv$' \
&& php -m | grep -oiE '^sqlsrv$' \
;fi \
;fi
@ -787,7 +787,9 @@ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
ARG INSTALL_SMB=false
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
###########################################################################