Browse Source

Added SQLSRV and PDO_SQLSRV extensions for PHP 7.0 or above

master
Rafael Mello 8 years ago
parent
commit
47644f00a1
4 changed files with 27 additions and 18 deletions
  1. +3
    -3
      5.6/Dockerfile
  2. +11
    -7
      7.0/Dockerfile
  3. +11
    -8
      7.1/Dockerfile
  4. +2
    -0
      README.md

+ 3
- 3
5.6/Dockerfile View File

@ -51,12 +51,12 @@ RUN curl -sS https://getcomposer.org/installer | php -- \
# Install PHP extensions # Install PHP extensions
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ 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 \ && 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 apcu-4.0.10 \
&& pecl install redis-2.2.8 \ && pecl install redis-2.2.8 \
&& pecl install gearman \ && pecl install gearman \
&& pecl install memcached \ && 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 \ && docker-php-ext-install \
iconv \ iconv \
mbstring \ mbstring \
@ -82,7 +82,7 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di
gearman \ gearman \
opcache opcache
# Install PHPUnit 5.5
# Install PHPUnit
RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \ RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit


+ 11
- 7
7.0/Dockerfile View File

@ -40,7 +40,9 @@ RUN apt-get update \
libxml2-dev \ libxml2-dev \
libaio-dev \ libaio-dev \
libmemcached-dev \ libmemcached-dev \
freetds-dev
freetds-dev \
libssl-dev \
opensslz
# Install Composer # Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- \ RUN curl -sS https://getcomposer.org/installer | php -- \
@ -50,12 +52,12 @@ RUN curl -sS https://getcomposer.org/installer | php -- \
# Install PHP extensions # Install PHP extensions
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ 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 \ && 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_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-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 \ && docker-php-ext-install \
iconv \ iconv \
mbstring \ mbstring \
@ -71,12 +73,14 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di
soap \ soap \
sockets \ sockets \
zip \ zip \
memcached \
pcntl \ pcntl \
ftp \ ftp \
&& docker-php-ext-enable \ && docker-php-ext-enable \
oci8 \ oci8 \
sqlsrv \
pdo_sqlsrv \
redis \ redis \
memcached \
opcache opcache
# Install APCu and APC backward compatibility # 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 apcu --ini-name 10-docker-php-ext-apcu.ini \
&& docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.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 \ RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit


+ 11
- 8
7.1/Dockerfile View File

@ -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 \ && ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so \
&& rm -rf /opt/oracle/*.zip && rm -rf /opt/oracle/*.zip
# Install PHP extensions deps # Install PHP extensions deps
RUN apt-get update \ RUN apt-get update \
&& apt-get install --no-install-recommends -y \ && apt-get install --no-install-recommends -y \
@ -40,7 +39,9 @@ RUN apt-get update \
libxml2-dev \ libxml2-dev \
libaio-dev \ libaio-dev \
libmemcached-dev \ libmemcached-dev \
freetds-dev
freetds-dev \
libssl-dev \
openssl
# Install Composer # Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- \ RUN curl -sS https://getcomposer.org/installer | php -- \
@ -50,12 +51,12 @@ RUN curl -sS https://getcomposer.org/installer | php -- \
# Install PHP extensions # Install PHP extensions
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ 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 \ && 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_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-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 \ && docker-php-ext-install \
iconv \ iconv \
mbstring \ mbstring \
@ -71,12 +72,14 @@ RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-di
soap \ soap \
sockets \ sockets \
zip \ zip \
memcached \
pcntl \ pcntl \
ftp \ ftp \
&& docker-php-ext-enable \ && docker-php-ext-enable \
oci8 \ oci8 \
sqlsrv \
pdo_sqlsrv \
redis \ redis \
memcached \
opcache opcache
# Install APCu and APC backward compatibility # 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 apcu --ini-name 10-docker-php-ext-apcu.ini \
&& docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.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 \ RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit


+ 2
- 0
README.md View File

@ -31,6 +31,8 @@ Extensions
- pgsql - pgsql
- mysqli - mysqli
- oci8 - oci8
- sqlsrv *(PHP 7.0 or above)*
- pdo_sqlsrv *(PHP 7.0 or above)*
- pdo_pgsql - pdo_pgsql
- pdo_mysql - pdo_mysql
- pdo_oci - pdo_oci


Loading…
Cancel
Save