From 0aaa2c742e2471e0743c619dbefc75715dd46b23 Mon Sep 17 00:00:00 2001 From: Fruty Date: Thu, 28 Dec 2017 14:25:32 +0200 Subject: [PATCH] Added support for AMQP extension in workspace and php-fpm containers. --- docker-compose.yml | 2 ++ env-example | 2 ++ php-fpm/Dockerfile-56 | 12 ++++++++++++ php-fpm/Dockerfile-70 | 12 ++++++++++++ php-fpm/Dockerfile-71 | 12 ++++++++++++ workspace/Dockerfile-56 | 15 +++++++++++++++ workspace/Dockerfile-70 | 15 +++++++++++++++ workspace/Dockerfile-71 | 15 +++++++++++++++ 8 files changed, 85 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 166f7f36..820e3884 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: - INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP} - INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP} - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO} + - INSTALL_AMQP=${WORKSPACE_INSTALL_AMQP} - INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS} - INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} @@ -71,6 +72,7 @@ services: - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP} - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO} + - INSTALL_AMQP=${PHP_FPM_INSTALL_AMQP} - INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL} - INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} diff --git a/env-example b/env-example index 5d5d73b2..4406166f 100644 --- a/env-example +++ b/env-example @@ -63,6 +63,7 @@ WORKSPACE_INSTALL_LDAP=false WORKSPACE_INSTALL_SOAP=false WORKSPACE_INSTALL_IMAP=false WORKSPACE_INSTALL_MONGO=false +WORKSPACE_INSTALL_AMQP=false WORKSPACE_INSTALL_PHPREDIS=false WORKSPACE_INSTALL_MSSQL=false WORKSPACE_INSTALL_NODE=false @@ -97,6 +98,7 @@ WORKSPACE_SSH_PORT=2222 PHP_FPM_INSTALL_XDEBUG=false PHP_FPM_INSTALL_MONGO=false +PHP_FPM_INSTALL_AMQP=false PHP_FPM_INSTALL_MSSQL=false PHP_FPM_INSTALL_SOAP=false PHP_FPM_INSTALL_ZIP_ARCHIVE=false diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 4678d8ed..bdf7e0b0 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -136,6 +136,18 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ docker-php-ext-enable mongodb \ ;fi +##################################### +# AMQP: +##################################### + +ARG INSTALL_AMQP=false +RUN if [ ${INSTALL_AMQP} = true ]; then \ + apt-get install librabbitmq-dev -y && \ + # Install the amqp extension + pecl install amqp && \ + docker-php-ext-enable amqp \ +;fi + ##################################### # ZipArchive: ##################################### diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 8a8bbd45..01e1ce7c 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -133,6 +133,18 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ docker-php-ext-enable mongodb \ ;fi +##################################### +# AMQP: +##################################### + +ARG INSTALL_AMQP=false +RUN if [ ${INSTALL_AMQP} = true ]; then \ + apt-get install librabbitmq-dev -y && \ + # Install the amqp extension + pecl install amqp && \ + docker-php-ext-enable amqp \ +;fi + ##################################### # ZipArchive: ##################################### diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 0b31f6d8..b5021c91 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -133,6 +133,18 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ docker-php-ext-enable mongodb \ ;fi +##################################### +# AMQP: +##################################### + +ARG INSTALL_AMQP=false +RUN if [ ${INSTALL_AMQP} = true ]; then \ + apt-get install librabbitmq-dev -y && \ + # Install the amqp extension + pecl install amqp && \ + docker-php-ext-enable amqp \ +;fi + ##################################### # ZipArchive: ##################################### diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index 457f76e9..00d35a85 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -226,6 +226,21 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/30-mongodb.ini \ ;fi +##################################### +# AMQP: +##################################### + +# Check if Mongo needs to be installed +ARG INSTALL_AMQP=false +ENV INSTALL_AMQP ${INSTALL_AMQP} +RUN if [ ${INSTALL_AMQP} = true ]; then \ + apt-get install librabbitmq-dev -y && \ + # Install the mongodb extension + pecl -q install amqp && \ + echo "extension=amqp.so" >> /etc/php/5.6/mods-available/amqp.ini && \ + ln -s /etc/php/5.6/mods-available/amqp.ini /etc/php/5.6/cli/conf.d/30-amqp.ini \ +;fi + ##################################### # PHP REDIS EXTENSION FOR PHP 5.6 ##################################### diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index c6fc7d97..c5233f19 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -222,6 +222,21 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \ ;fi +##################################### +# AMQP: +##################################### + +# Check if Mongo needs to be installed +ARG INSTALL_AMQP=false +ENV INSTALL_AMQP ${INSTALL_AMQP} +RUN if [ ${INSTALL_AMQP} = true ]; then \ + apt-get install librabbitmq-dev -y && \ + # Install the mongodb extension + pecl -q install amqp && \ + echo "extension=amqp.so" >> /etc/php/7.0/mods-available/amqp.ini && \ + ln -s /etc/php/7.0/mods-available/amqp.ini /etc/php/7.0/cli/conf.d/30-amqp.ini \ +;fi + ##################################### # PHP REDIS EXTENSION FOR PHP 7 ##################################### diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 1b7720bf..e258d570 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -218,6 +218,21 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \ ;fi +##################################### +# AMQP: +##################################### + +# Check if Mongo needs to be installed +ARG INSTALL_AMQP=false +ENV INSTALL_AMQP ${INSTALL_AMQP} +RUN if [ ${INSTALL_AMQP} = true ]; then \ + apt-get install librabbitmq-dev -y && \ + # Install the mongodb extension + pecl -q install amqp && \ + echo "extension=amqp.so" >> /etc/php/7.1/mods-available/amqp.ini && \ + ln -s /etc/php/7.1/mods-available/amqp.ini /etc/php/7.1/cli/conf.d/30-amqp.ini \ +;fi + ##################################### # PHP REDIS EXTENSION FOR PHP 7.1 #####################################