diff --git a/7.1/Dockerfile b/7.1/Dockerfile new file mode 100644 index 0000000..1fa3c19 --- /dev/null +++ b/7.1/Dockerfile @@ -0,0 +1,94 @@ +FROM php:7.1-fpm + +# Get repository and install wget and vim +RUN apt-get update && apt-get install --no-install-recommends -y \ + wget \ + vim \ + git \ + unzip + +# Add PostgreSQL repository +RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgdg.list +RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ + apt-key add - + +# Install Oracle Instantclient +RUN mkdir /opt/oracle \ + && cd /opt/oracle \ + && wget https://s3.amazonaws.com/merofile/instantclient-basic-linux.x64-12.1.0.2.0.zip \ + && wget https://s3.amazonaws.com/merofile/instantclient-sdk-linux.x64-12.1.0.2.0.zip \ + && unzip /opt/oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/oracle \ + && unzip /opt/oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/oracle \ + && ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so \ + && ln -s /opt/oracle/instantclient_12_1/libclntshcore.so.12.1 /opt/oracle/instantclient_12_1/libclntshcore.so \ + && 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 \ + postgresql-server-dev-9.5 \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng12-dev \ + zlib1g-dev \ + libicu-dev \ + g++ \ + unixodbc-dev \ + libxml2-dev \ + libaio-dev \ + libmemcached-dev \ + freetds-dev + +# Install Composer +RUN curl -sS https://getcomposer.org/installer | php -- \ + --install-dir=/usr/local/bin \ + --filename=composer + +# 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 \ + && docker-php-ext-install \ + iconv \ + mbstring \ + intl \ + mcrypt \ + gd \ + pgsql \ + mysqli \ + pdo_pgsql \ + pdo_mysql \ + pdo_oci \ + pdo_dblib \ + soap \ + sockets \ + zip \ + memcached \ + pcntl \ + ftp \ + && docker-php-ext-enable \ + oci8 \ + redis \ + opcache + +# Install APCu and APC backward compatibility +RUN pecl install apcu \ + && pecl install apcu_bc-1.0.3 \ + && 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 +RUN wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit \ + && chmod +x /usr/local/bin/phpunit + +# Clean repository +RUN apt-get clean \ + && rm -rf /var/lib/apt/lists/*