From c44338e370f5c1bd984ba65e884b811d97e4fdaf Mon Sep 17 00:00:00 2001 From: x <825455423@qq.com> Date: Tue, 9 Jan 2018 11:25:57 +0800 Subject: [PATCH] workspace container adds swoole --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile-56 | 12 ++++++++++++ workspace/Dockerfile-70 | 12 ++++++++++++ workspace/Dockerfile-71 | 12 ++++++++++++ 5 files changed, 38 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 166f7f36..97c3de5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,6 +41,7 @@ services: - INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM} - INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS} - INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT} + - INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE} - PUID=${WORKSPACE_PUID} - PGID=${WORKSPACE_PGID} - CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION} diff --git a/env-example b/env-example index 5d5d73b2..b766ac31 100644 --- a/env-example +++ b/env-example @@ -85,6 +85,7 @@ WORKSPACE_INSTALL_IMAGEMAGICK=false WORKSPACE_INSTALL_TERRAFORM=false WORKSPACE_INSTALL_DUSK_DEPS=false WORKSPACE_INSTALL_PG_CLIENT=false +WORKSPACE_INSTALL_SWOOLE=false WORKSPACE_PUID=1000 WORKSPACE_PGID=1000 WORKSPACE_CHROME_DRIVER_VERSION=2.32 diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index 457f76e9..a9dc1b35 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -239,6 +239,18 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ phpenmod redis \ ;fi +##################################### +# Swoole EXTENSION FOR PHP 5.6 +##################################### + +ARG INSTALL_SWOOLE=false +RUN if [ ${INSTALL_SWOOLE} = true ]; then \ + # Install Php Swoole Extension + pecl -q install swoole && \ + echo "extension=swoole.so" >> /etc/php/5.6/mods-available/swoole.ini && \ + ln -s /etc/php/5.6/mods-available/swoole.ini /etc/php/5.6/cli/conf.d/20-swoole.ini \ +;fi + ##################################### # Drush: ##################################### diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index c6fc7d97..481ad29f 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -235,6 +235,18 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ phpenmod redis \ ;fi +##################################### +# Swoole EXTENSION FOR PHP 7 +##################################### + +ARG INSTALL_SWOOLE=false +RUN if [ ${INSTALL_SWOOLE} = true ]; then \ + # Install Php Swoole Extension + pecl -q install swoole && \ + echo "extension=swoole.so" >> /etc/php/7.0/mods-available/swoole.ini && \ + ln -s /etc/php/7.0/mods-available/swoole.ini /etc/php/7.0/cli/conf.d/20-swoole.ini \ +;fi + ##################################### # Drush: ##################################### diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 1b7720bf..048e8701 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -231,6 +231,18 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ phpenmod redis \ ;fi +##################################### +# Swoole EXTENSION FOR PHP 7 +##################################### + +ARG INSTALL_SWOOLE=false +RUN if [ ${INSTALL_SWOOLE} = true ]; then \ + # Install Php Swoole Extension + pecl -q install swoole && \ + echo "extension=swoole.so" >> /etc/php/7.1/mods-available/swoole.ini && \ + ln -s /etc/php/7.1/mods-available/swoole.ini /etc/php/7.1/cli/conf.d/20-swoole.ini \ +;fi + ##################################### # Drush: #####################################