From 8bacb129c6c470bae060b3c70135cc28af9205e4 Mon Sep 17 00:00:00 2001 From: Edmund Luong Date: Tue, 13 Dec 2016 20:00:48 -0500 Subject: [PATCH] Add option to install Google V8 Javascript Engine PHP extension --- docker-compose.yml | 1 + workspace/Dockerfile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9ecc41b7..2c4a6334 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,7 @@ services: - INSTALL_YARN=false - INSTALL_DRUSH=false - INSTALL_AEROSPIKE_EXTENSION=false + - INSTALL_V8JS_EXTENSION=false - COMPOSER_GLOBAL_INSTALL=false - INSTALL_WORKSPACE_SSH=false - PUID=1000 diff --git a/workspace/Dockerfile b/workspace/Dockerfile index a301d08c..e1782b20 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -235,6 +235,23 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \ rm /etc/php/7.0/cli/conf.d/aerospike.ini \ ;fi +##################################### +# PHP V8JS: +##################################### +USER root + +ARG INSTALL_V8JS_EXTENSION=false +ENV INSTALL_V8JS_EXTENSION ${INSTALL_V8JS_EXTENSION} + +RUN if [ ${INSTALL_V8JS_EXTENSION} = true ]; then \ + # Install the php V8JS extension + add-apt-repository -y ppa:pinepain/libv8-5.4 \ + && apt-get update \ + && apt-get install -y php-dev php-pear libv8-5.4 \ + && pecl install v8js \ + && echo "extension=v8js.so" >> /etc/php/7.0/cli/php.ini \ +;fi + ##################################### # Non-root user : PHPUnit path #####################################