From 47644f00a1be564ec1de008b9751d9e84cfb2f07 Mon Sep 17 00:00:00 2001 From: Rafael Mello Date: Mon, 13 Feb 2017 16:16:05 -0200 Subject: [PATCH] Added SQLSRV and PDO_SQLSRV extensions for PHP 7.0 or above --- 5.6/Dockerfile | 6 +++--- 7.0/Dockerfile | 18 +++++++++++------- 7.1/Dockerfile | 19 +++++++++++-------- README.md | 2 ++ 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 0e59080..9b6b488 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -51,12 +51,12 @@ RUN curl -sS https://getcomposer.org/installer | php -- \ # Install PHP extensions RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.10 \ + && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_1,12.1 \ + && docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \ && pecl install apcu-4.0.10 \ && pecl install redis-2.2.8 \ && pecl install gearman \ && pecl install memcached \ - && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_1,12.1 \ - && docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \ && docker-php-ext-install \ iconv \ mbstring \ @@ -82,7 +82,7 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di gearman \ opcache -# Install PHPUnit 5.5 +# Install PHPUnit RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit diff --git a/7.0/Dockerfile b/7.0/Dockerfile index 2aeee9f..7c2badc 100644 --- a/7.0/Dockerfile +++ b/7.0/Dockerfile @@ -40,7 +40,9 @@ RUN apt-get update \ libxml2-dev \ libaio-dev \ libmemcached-dev \ - freetds-dev + freetds-dev \ + libssl-dev \ + opensslz # Install Composer RUN curl -sS https://getcomposer.org/installer | php -- \ @@ -50,12 +52,12 @@ RUN curl -sS https://getcomposer.org/installer | php -- \ # Install PHP extensions RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8 \ - && pecl install redis \ - && git clone https://github.com/php-memcached-dev/php-memcached /usr/src/php/ext/memcached \ - && cd /usr/src/php/ext/memcached && git checkout -b php7 origin/php7 \ - && docker-php-ext-configure memcached \ && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_1,12.1 \ && docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \ + && pecl install sqlsrv-4.1.6.1 \ + && pecl install pdo_sqlsrv-4.1.6.1 \ + && pecl install redis \ + && pecl install memcached \ && docker-php-ext-install \ iconv \ mbstring \ @@ -71,12 +73,14 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di soap \ sockets \ zip \ - memcached \ pcntl \ ftp \ && docker-php-ext-enable \ oci8 \ + sqlsrv \ + pdo_sqlsrv \ redis \ + memcached \ opcache # Install APCu and APC backward compatibility @@ -85,7 +89,7 @@ RUN pecl install apcu \ && docker-php-ext-enable apcu --ini-name 10-docker-php-ext-apcu.ini \ && docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.ini -# Install PHPUnit 5.5 +# Install PHPUnit RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit diff --git a/7.1/Dockerfile b/7.1/Dockerfile index 1fa3c19..00fd88f 100644 --- a/7.1/Dockerfile +++ b/7.1/Dockerfile @@ -24,7 +24,6 @@ RUN mkdir /opt/oracle \ && ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so \ && rm -rf /opt/oracle/*.zip - # Install PHP extensions deps RUN apt-get update \ && apt-get install --no-install-recommends -y \ @@ -40,7 +39,9 @@ RUN apt-get update \ libxml2-dev \ libaio-dev \ libmemcached-dev \ - freetds-dev + freetds-dev \ + libssl-dev \ + openssl # Install Composer RUN curl -sS https://getcomposer.org/installer | php -- \ @@ -50,12 +51,12 @@ RUN curl -sS https://getcomposer.org/installer | php -- \ # Install PHP extensions RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8 \ - && pecl install redis \ - && git clone https://github.com/php-memcached-dev/php-memcached /usr/src/php/ext/memcached \ - && cd /usr/src/php/ext/memcached && git checkout -b php7 origin/php7 \ - && docker-php-ext-configure memcached \ && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_1,12.1 \ && docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \ + && pecl install sqlsrv-4.1.6.1 \ + && pecl install pdo_sqlsrv-4.1.6.1 \ + && pecl install redis \ + && pecl install memcached \ && docker-php-ext-install \ iconv \ mbstring \ @@ -71,12 +72,14 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di soap \ sockets \ zip \ - memcached \ pcntl \ ftp \ && docker-php-ext-enable \ oci8 \ + sqlsrv \ + pdo_sqlsrv \ redis \ + memcached \ opcache # Install APCu and APC backward compatibility @@ -85,7 +88,7 @@ RUN pecl install apcu \ && docker-php-ext-enable apcu --ini-name 10-docker-php-ext-apcu.ini \ && docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.ini -# Install PHPUnit 5.5 +# Install PHPUnit RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit diff --git a/README.md b/README.md index c907080..0ee03fe 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Extensions - pgsql - mysqli - oci8 +- sqlsrv *(PHP 7.0 or above)* +- pdo_sqlsrv *(PHP 7.0 or above)* - pdo_pgsql - pdo_mysql - pdo_oci