This commit is contained in:
Zuohuadong
2017-10-12 18:54:09 +08:00
parent eefd04dbfc
commit 17ea7b313f
104 changed files with 2759 additions and 13902 deletions

View File

@ -45,7 +45,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install the soap extension
apt-get -y update && \
apt-get update -yqq && \
apt-get -y install libxml2-dev php-soap && \
docker-php-ext-install soap \
;fi
@ -61,7 +61,7 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
docker-php-ext-enable xdebug \
;fi
# Copy xdebug configration for remote debugging
# Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
#####################################
@ -78,17 +78,28 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
;fi
#####################################
# PHP REDIS EXTENSION FOR PHP 7
# PHP REDIS EXTENSION FOR PHP 7.0
#####################################
ARG INSTALL_PHPREDIS=false
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
# Install Php Redis Extension
pecl install -o -f redis \
printf "\n" | pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
;fi
#####################################
# Swoole EXTENSION FOR PHP 7
#####################################
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
;fi
#####################################
# MongoDB:
#####################################
@ -156,23 +167,32 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \
# PHP Aerospike:
#####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
ARG INSTALL_AEROSPIKE=false
ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE}
# Copy aerospike configration for remote debugging
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
# Fix dependencies for PHPUnit within aerospike extension
apt-get update -yqq && \
apt-get -y install sudo wget && \
# Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \
&& mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \
cd aerospike-client-php/src/aerospike \
cd aerospike-client-php/src \
&& phpize \
&& ./build.sh \
&& make install \
) \
&& rm /tmp/aerospike-client-php.tar.gz \
&& docker-php-ext-enable aerospike \
;fi
RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \
rm /usr/local/etc/php/conf.d/aerospike.ini \
;fi
#####################################
@ -202,7 +222,7 @@ RUN if [ ${INSTALL_MYSQLI} = true ]; then \
ARG INSTALL_TOKENIZER=false
RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
docker-php-ext-install tokenizer \
docker-php-ext-install tokenizer \
;fi
#####################################
@ -212,6 +232,7 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
ARG INSTALL_INTL=false
RUN if [ ${INSTALL_INTL} = true ]; then \
# Install intl and requirements
apt-get update -yqq && \
apt-get install -y zlib1g-dev libicu-dev g++ && \
docker-php-ext-configure intl && \
docker-php-ext-install intl \
@ -225,12 +246,73 @@ ARG INSTALL_GHOSTSCRIPT=false
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
# Install the ghostscript extension
# for PDF editing
apt-get -y update \
apt-get update -yqq \
&& apt-get install -y \
poppler-utils \
ghostscript \
;fi
#####################################
# LDAP:
#####################################
ARG INSTALL_LDAP=false
RUN if [ ${INSTALL_LDAP} = true ]; then \
apt-get update -yqq && \
apt-get install -y libldap2-dev && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
docker-php-ext-install ldap \
;fi
#####################################
# SQL SERVER:
#####################################
ARG INSTALL_MSSQL=false
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
RUN 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 \
# 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 \
# 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 \
;fi
#####################################
# Image optimizers:
#####################################
USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get update -yqq && \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
;fi
#####################################
# ImageMagick:
#####################################
USER root
ARG INSTALL_IMAGEMAGICK=false
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get update -y && \
apt-get install -y libmagickwand-dev imagemagick && \
pecl install imagick && \
docker-php-ext-enable imagick \
;fi
#
#--------------------------------------------------------------------------
# Final Touch
@ -238,7 +320,7 @@ RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
#
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/*