Update MSSQL Drivers To Newest Version (#1707)
Remove version lock from pecl install Update to Debian 9 repos since our image is Debian 9 Remove duplicate locales-gen line Closes #1622
This commit is contained in:
parent
b2ab970d04
commit
1acbebc2a3
@ -416,14 +416,16 @@ RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
|
|||||||
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
|
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
|
||||||
apt-get install -y apt-transport-https gnupg \
|
apt-get install -y apt-transport-https gnupg \
|
||||||
&& 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/8/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
&& curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
||||||
&& apt-get update -yqq \
|
&& apt-get update -yqq \
|
||||||
# Install Dependencies
|
# Install Dependencies
|
||||||
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
|
&& ACCEPT_EULA=Y apt-get install -y 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 \
|
||||||
|
# link local aliases
|
||||||
|
&& ln -s /etc/locale.alias /usr/share/locale/locale.alias \
|
||||||
&& locale-gen \
|
&& locale-gen \
|
||||||
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
|
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
|
||||||
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
|
&& pecl install pdo_sqlsrv sqlsrv \
|
||||||
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
|
||||||
&& php -m | grep -q 'pdo_sqlsrv' \
|
&& php -m | grep -q 'pdo_sqlsrv' \
|
||||||
&& php -m | grep -q 'sqlsrv' \
|
&& php -m | grep -q 'sqlsrv' \
|
||||||
|
@ -641,23 +641,12 @@ RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
|
|||||||
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/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
curl https://packages.microsoft.com/config/ubuntu/16.04/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 msodbcsql=13.0.1.0-1 mssql-tools=14.0.2.0-1 && \
|
ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools unixodbc unixodbc-dev libgss3 odbcinst locales && \
|
||||||
apt-get install -yqq unixodbc-dev-utf16 && \
|
ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd && \
|
||||||
ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd && \
|
ln -sfn /opt/mssql-tools/bin/bcp /usr/bin/bcp && \
|
||||||
ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp && \
|
|
||||||
ACCEPT_EULA=Y apt-get install -yqq \
|
|
||||||
unixodbc \
|
|
||||||
unixodbc-dev \
|
|
||||||
libgss3 \
|
|
||||||
odbcinst \
|
|
||||||
msodbcsql \
|
|
||||||
locales && \
|
|
||||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
|
||||||
locale-gen && \
|
|
||||||
pecl install sqlsrv-4.3.0 pdo_sqlsrv-4.3.0 && \
|
|
||||||
apt-get install -y locales && \
|
|
||||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
locale-gen && \
|
locale-gen && \
|
||||||
|
pecl install sqlsrv pdo_sqlsrv && \
|
||||||
echo "extension=sqlsrv.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-sqlsrv.ini && \
|
echo "extension=sqlsrv.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-sqlsrv.ini && \
|
||||||
echo "extension=pdo_sqlsrv.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-pdo_sqlsrv.ini \
|
echo "extension=pdo_sqlsrv.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-pdo_sqlsrv.ini \
|
||||||
&& php -m | grep -q 'sqlsrv' \
|
&& php -m | grep -q 'sqlsrv' \
|
||||||
|
Loading…
Reference in New Issue
Block a user