Merge pull request #1450 from bestlong/increase-install-check

Increase install check
This commit is contained in:
Yu-Lung Shao (Allen) 2018-03-24 15:28:29 +08:00 committed by GitHub
commit c84a57cd13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 56 additions and 42 deletions

View File

@ -302,11 +302,11 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \
#####################################
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
apt-get -y install php5-sybase freetds-bin && \
cp /usr/lib/php5/20131226/*.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ && \
docker-php-ext-enable mssql pdo pdo_dblib \
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
apt-get -y install php5-sybase freetds-bin \
&& cp /usr/lib/php5/20131226/*.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ \
&& docker-php-ext-enable pdo_dblib mssql \
&& php -m | grep -q 'mssql' \
;fi
#####################################

View File

@ -308,26 +308,27 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# 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 update -yqq \
&& apt-get install -y apt-transport-https \
&& 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 \
&& apt-get update -yqq \
&& apt-get install -y apt-transport-https \
&& 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 \
&& apt-get update -yqq \
# Install Dependencies
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
# 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 \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
&& php -m | grep -q 'pdo_sqlsrv' \
&& php -m | grep -q 'sqlsrv' \
;fi
#####################################

View File

@ -308,24 +308,27 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# 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 update -yqq && apt-get install -y apt-transport-https \
&& 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 \
&& apt-get update -yqq \
apt-get update -yqq \
&& apt-get install -y apt-transport-https \
&& 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 \
&& apt-get update -yqq \
# Install Dependencies
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
# 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 \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
&& php -m | grep -q 'pdo_sqlsrv' \
&& php -m | grep -q 'sqlsrv' \
;fi
#####################################

View File

@ -311,26 +311,27 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# 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 update -yqq && apt-get install -y apt-transport-https gnupg \
&& 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 \
&& apt-get update -yqq \
apt-get update -yqq \
&& apt-get install -y apt-transport-https gnupg \
&& 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 \
&& apt-get update -yqq \
# Install Dependencies
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen \
# 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 \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
&& php -m | grep -q 'pdo_sqlsrv' \
&& php -m | grep -q 'sqlsrv' \
;fi
#####################################

View File

@ -540,9 +540,12 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
apt-get -y install php5.6-sybase freetds-bin freetds-common libsybdb5 \
&& echo "extension=mssql.so" > /etc/php/5.6/cli/conf.d/20-mssql.ini \
&& echo "extension=pdo_dblib.so" > /etc/php/5.6/cli/conf.d/20-pdo_dblib.ini \
&& php -m | grep -q 'mssql' \
&& php -m | grep -q 'pdo_dblib' \
;fi
#####################################

View File

@ -536,7 +536,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
ARG INSTALL_MSSQL=true
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# The following steps were taken from
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
@ -563,6 +563,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
locale-gen && \
echo "extension=sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-sqlsrv.ini && \
echo "extension=pdo_sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-pdo_sqlsrv.ini \
&& php -m | grep -q 'sqlsrv' \
&& php -m | grep -q 'pdo_sqlsrv' \
;fi
#####################################

View File

@ -536,7 +536,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# The following steps were taken from
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
@ -563,6 +563,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
locale-gen && \
echo "extension=sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-sqlsrv.ini && \
echo "extension=pdo_sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-pdo_sqlsrv.ini \
&& php -m | grep -q 'sqlsrv' \
&& php -m | grep -q 'pdo_sqlsrv' \
;fi
#####################################

View File

@ -536,7 +536,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN if [ ${INSTALL_MSSQL} = true ]; then \
RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \
#####################################
# The following steps were taken from
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
@ -563,6 +563,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
locale-gen && \
echo "extension=sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-sqlsrv.ini && \
echo "extension=pdo_sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-pdo_sqlsrv.ini \
&& php -m | grep -q 'sqlsrv' \
&& php -m | grep -q 'pdo_sqlsrv' \
;fi
#####################################