From 7dbe65e5f86161008d1076140712ecaceef2b2d2 Mon Sep 17 00:00:00 2001 From: Winfried Date: Tue, 11 Apr 2017 16:47:38 +0200 Subject: [PATCH 1/8] Bringing Dockerfile 71 up-to-date with 70 --- php-fpm/Dockerfile-71 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 94beab0..7b2c3ae 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -37,6 +37,18 @@ MAINTAINER Mahmoud Zalt # - ... # +##################################### +# SOAP: +##################################### + +ARG INSTALL_SOAP=false +RUN if [ ${INSTALL_SOAP} = true ]; then \ + # Install the soap extension + apt-get -y update && \ + apt-get -y install libxml2-dev php-soap && \ + docker-php-ext-install soap \ +;fi + ##################################### # xDebug: ##################################### @@ -72,6 +84,16 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ docker-php-ext-install zip \ ;fi +##################################### +# bcmath: +##################################### + +ARG INSTALL_BCMATH=false +RUN if [ ${INSTALL_BCMATH} = true ]; then \ + # Install the bcmath extension + docker-php-ext-install bcmath \ +;fi + ##################################### # PHP Memcached: ##################################### @@ -114,6 +136,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ + && docker-php-ext-enable aerospike \ ;fi ##################################### From f91def64d7f97a3a9101823a5e520bcc05c1a882 Mon Sep 17 00:00:00 2001 From: Winfried Date: Tue, 11 Apr 2017 21:22:57 +0200 Subject: [PATCH 2/8] Fixing whitespaces and tailing spaces --- docker-compose.yml | 1 + php-fpm/Dockerfile-56 | 2 +- php-fpm/Dockerfile-70 | 8 +++----- php-fpm/Dockerfile-71 | 3 ++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6563967..8a0a24a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,6 +82,7 @@ services: - backend ### PHP Worker Container ##################################### + php-worker: build: context: ./php-worker diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 9519b7b..03d6a03 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -44,7 +44,7 @@ ARG INSTALL_SOAP=false RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the soap extension apt-get -y update && \ - apt-get -y install libxml2-dev php-soap && \ + apt-get -y install libxml2-dev php-soap && \ docker-php-ext-install soap \ ;fi diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index e0895fa..7665d41 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -34,7 +34,6 @@ MAINTAINER Mahmoud Zalt # in the `docker-compose.yml` before the build. # Example: # - INSTALL_ZIP_ARCHIVE=true -# - ... # ##################################### @@ -139,7 +138,6 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \ docker-php-ext-enable exif \ ;fi - ##################################### # PHP Aerospike: ##################################### @@ -166,6 +164,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ ##################################### # Opcache: ##################################### + ARG INSTALL_OPCACHE=false RUN if [ ${INSTALL_OPCACHE} = true ]; then \ docker-php-ext-install opcache && \ @@ -178,6 +177,7 @@ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### # Mysqli Modifications: ##################################### + ARG INSTALL_MYSQLI=false RUN if [ ${INSTALL_MYSQLI} = true ]; then \ docker-php-ext-install mysqli \ @@ -195,6 +195,7 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ ##################################### # SQL SERVER: ##################################### + ARG MSSQL=false RUN if [ ${MSSQL} = true ]; then \ @@ -245,7 +246,6 @@ RUN if [ ${MSSQL} = true ]; then \ && ls -l /opt/microsoft/msodbcsql/ \ && odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \ - ##################################### # Install sqlsrv y pdo_sqlsrv # extensions: @@ -263,8 +263,6 @@ RUN if [ ${MSSQL} = true ]; then \ && locale-gen \ ;fi - - ##################################### # Human Language and Character Encoding Support: ##################################### diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 96df389..b48f5a0 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -34,7 +34,6 @@ MAINTAINER Mahmoud Zalt # in the `docker-compose.yml` before the build. # Example: # - INSTALL_ZIP_ARCHIVE=true -# - ... # ##################################### @@ -142,6 +141,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ ##################################### # Opcache: ##################################### + ARG INSTALL_OPCACHE=false RUN if [ ${INSTALL_OPCACHE} = true ]; then \ docker-php-ext-install opcache && \ @@ -154,6 +154,7 @@ COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini ##################################### # Mysqli Modifications: ##################################### + ARG INSTALL_MYSQLI=false RUN if [ ${INSTALL_MYSQLI} = true ]; then \ docker-php-ext-install mysqli \ From 059468176090e2cf4d832256545cde7314090754 Mon Sep 17 00:00:00 2001 From: Winfried Date: Tue, 11 Apr 2017 23:10:41 +0200 Subject: [PATCH 3/8] Fixing the php ext already loaded warnings Example: ``` warning: exif (exif.so) is already loaded! ``` --- php-fpm/Dockerfile-56 | 6 ++---- php-fpm/Dockerfile-70 | 6 ++---- php-fpm/Dockerfile-71 | 7 +++---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 9519b7b..dcc1e47 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -114,8 +114,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ ARG INSTALL_EXIF=false RUN if [ ${INSTALL_EXIF} = true ]; then \ # Enable Exif PHP extentions requirements - docker-php-ext-install exif && \ - docker-php-ext-enable exif \ + docker-php-ext-install exif \ ;fi ##################################### @@ -147,8 +146,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ ARG INSTALL_OPCACHE=false RUN if [ ${INSTALL_OPCACHE} = true ]; then \ - docker-php-ext-install opcache && \ - docker-php-ext-enable opcache \ + docker-php-ext-install opcache \ ;fi # Copy opcache configration diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index e0895fa..57f753c 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -135,8 +135,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ ARG INSTALL_EXIF=false RUN if [ ${INSTALL_EXIF} = true ]; then \ # Enable Exif PHP extentions requirements - docker-php-ext-install exif && \ - docker-php-ext-enable exif \ + docker-php-ext-install exif \ ;fi @@ -168,8 +167,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ ##################################### ARG INSTALL_OPCACHE=false RUN if [ ${INSTALL_OPCACHE} = true ]; then \ - docker-php-ext-install opcache && \ - docker-php-ext-enable opcache \ + docker-php-ext-install opcache \ ;fi # Copy opcache configration diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 96df389..ff10de8 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -113,8 +113,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ ARG INSTALL_EXIF=false RUN if [ ${INSTALL_EXIF} = true ]; then \ # Enable Exif PHP extentions requirements - docker-php-ext-install exif && \ - docker-php-ext-enable exif \ + docker-php-ext-install exif \ ;fi ##################################### @@ -137,6 +136,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ + && docker-php-ext-enable aerospike \ ;fi ##################################### @@ -144,8 +144,7 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ ##################################### ARG INSTALL_OPCACHE=false RUN if [ ${INSTALL_OPCACHE} = true ]; then \ - docker-php-ext-install opcache && \ - docker-php-ext-enable opcache \ + docker-php-ext-install opcache \ ;fi # Copy opcache configration From 657d8535a6cbecd2e0ea0ae11fc39e283ec43c96 Mon Sep 17 00:00:00 2001 From: Winfried Date: Tue, 11 Apr 2017 23:15:09 +0200 Subject: [PATCH 4/8] Fixing not-consumed buildargs php-fpm-56 Should fix the following warning: ``` [Warning] One or more build-args [INSTALL_INTL INSTALL_PHPREDIS INSTALL_GHOSTSCRIPT] were not consumed ``` --- php-fpm/Dockerfile-56 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 9519b7b..4c4bd40 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -65,6 +65,18 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \ # Copy xdebug configration for remote debugging COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini +##################################### +# PHP REDIS EXTENSION FOR PHP 5 +##################################### + +ARG INSTALL_PHPREDIS=false +RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ + # Install Php Redis Extension + pecl install -o -f redis \ + && rm -rf /tmp/pear \ + && docker-php-ext-enable redis \ +;fi + ##################################### # MongoDB: ##################################### @@ -175,6 +187,29 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \ docker-php-ext-install tokenizer \ ;fi +##################################### +# Human Language and Character Encoding Support: +##################################### + +ARG INSTALL_INTL=false +RUN if [ ${INSTALL_INTL} = true ]; then \ + # Install intl and requirements + apt-get install -y zlib1g-dev libicu-dev g++ && \ + docker-php-ext-configure intl && \ + docker-php-ext-install intl \ +;fi + +##################################### +# GHOSTSCRIPT: +##################################### + +ARG INSTALL_GHOSTSCRIPT=false +RUN if [ ${GHOSTSCRIPT} = true ]; then \ + # Install the ghostscript extension for PDF editing + apt-get update && \ + apt-get install -y poppler-utils ghostscript \ +;fi + # #-------------------------------------------------------------------------- # Final Touch From 714902d12af68553b547f6a26bd2ad9c72122bf9 Mon Sep 17 00:00:00 2001 From: Winfried Date: Tue, 11 Apr 2017 23:17:21 +0200 Subject: [PATCH 5/8] Moving php-fpm xdebug config to proper location --- php-fpm/Dockerfile-70 | 6 +++--- php-fpm/Dockerfile-71 | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index e0895fa..c707753 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -60,6 +60,9 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \ docker-php-ext-enable xdebug \ ;fi +# Copy xdebug configration for remote debugging +COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini + ##################################### # PHP REDIS EXTENSION FOR PHP 7 ##################################### @@ -72,9 +75,6 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ && docker-php-ext-enable redis \ ;fi -# Copy xdebug configration for remote debugging -COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini - ##################################### # MongoDB: ##################################### diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 96df389..34fc602 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -48,6 +48,9 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \ docker-php-ext-enable xdebug \ ;fi +# Copy xdebug configration for remote debugging +COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini + ##################################### # PHP REDIS EXTENSION FOR PHP 7 ##################################### @@ -60,9 +63,6 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ && docker-php-ext-enable redis \ ;fi -# Copy xdebug configration for remote debugging -COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini - ##################################### # MongoDB: ##################################### From cdb456a9b59219e75e87469a530d73058e873950 Mon Sep 17 00:00:00 2001 From: Winfried Date: Tue, 11 Apr 2017 23:19:58 +0200 Subject: [PATCH 6/8] Fixing indentation --- php-fpm/Dockerfile-56 | 2 +- php-fpm/Dockerfile-70 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 03d6a03..0d5397e 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -172,7 +172,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 # diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 7665d41..7fabcd1 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -189,7 +189,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 ##################################### From a835c9e7091b64d45ed664d260c8cc4ba8b82f2e Mon Sep 17 00:00:00 2001 From: Winfried Date: Wed, 12 Apr 2017 00:28:54 +0200 Subject: [PATCH 7/8] Fixing soap already loaded warning in workspace --- workspace/Dockerfile-70 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index db6d5c7..323c502 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -60,8 +60,7 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the PHP SOAP extension apt-get -y update && \ add-apt-repository -y ppa:ondrej/php && \ - apt-get -y install libxml2-dev php7.0-soap && \ - echo "extension=soap.so" >> /etc/php/7.0/cli/conf.d/40-soap.ini \ + apt-get -y install libxml2-dev php7.0-soap \ ;fi ##################################### From ad00284a225c9453e0175f0fd26e95cc1a165aa8 Mon Sep 17 00:00:00 2001 From: Winfried Date: Wed, 12 Apr 2017 00:35:11 +0200 Subject: [PATCH 8/8] Removing ext enable aerospike error --- php-fpm/Dockerfile-71 | 1 - 1 file changed, 1 deletion(-) diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 7b2c3ae..bc4f5cf 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -136,7 +136,6 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ - && docker-php-ext-enable aerospike \ ;fi #####################################