Add IonCube Loader (zend_extension) (#1763)

This commit is contained in:
ganlei 2018-09-08 21:31:05 +08:00 committed by Shao Yu-Lung (Allen)
parent 902198ab05
commit 00df369e96
5 changed files with 56 additions and 0 deletions

View File

@ -353,6 +353,28 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
<br>
<a name="Install-ionCube-Loader"></a>
## Install ionCube Loader
1 - First install `ionCube Loader` in the Workspace and the PHP-FPM Containers:
<br>
a) open the `.env` file
<br>
b) search for the `WORKSPACE_INSTALL_IONCUBE` argument under the Workspace Container
<br>
c) set it to `true`
<br>
d) search for the `PHP_FPM_INSTALL_IONCUBE` argument under the PHP-FPM Container
<br>
e) set it to `true`
2 - Re-build the containers `docker-compose build workspace php-fpm`
Always download the latest version of [Loaders for ionCube ](http://www.ioncube.com/loaders.php).
<br> <br>

View File

@ -90,6 +90,7 @@ services:
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT} - INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE} - INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG} - INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
- INSTALL_IONCUBE=${WORKSPACE_INSTALL_IONCUBE}
- PUID=${WORKSPACE_PUID} - PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID} - PGID=${WORKSPACE_PGID}
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION} - CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
@ -148,6 +149,7 @@ services:
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK} - INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
- INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR} - INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR}
- INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME} - INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME}
- INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
volumes: volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini - ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}

View File

@ -116,6 +116,7 @@ WORKSPACE_INSTALL_DUSK_DEPS=false
WORKSPACE_INSTALL_PG_CLIENT=false WORKSPACE_INSTALL_PG_CLIENT=false
WORKSPACE_INSTALL_SWOOLE=false WORKSPACE_INSTALL_SWOOLE=false
WORKSPACE_INSTALL_LIBPNG=false WORKSPACE_INSTALL_LIBPNG=false
WORKSPACE_INSTALL_IONCUBE=false
WORKSPACE_PUID=1000 WORKSPACE_PUID=1000
WORKSPACE_PGID=1000 WORKSPACE_PGID=1000
WORKSPACE_CHROME_DRIVER_VERSION=2.32 WORKSPACE_CHROME_DRIVER_VERSION=2.32
@ -153,6 +154,7 @@ PHP_FPM_INSTALL_PG_CLIENT=false
PHP_FPM_INSTALL_PCNTL=false PHP_FPM_INSTALL_PCNTL=false
PHP_FPM_INSTALL_CALENDAR=false PHP_FPM_INSTALL_CALENDAR=false
PHP_FPM_INSTALL_FAKETIME=false PHP_FPM_INSTALL_FAKETIME=false
PHP_FPM_INSTALL_IONCUBE=false
PHP_FPM_FAKETIME=-0 PHP_FPM_FAKETIME=-0
### PHP_WORKER ############################################ ### PHP_WORKER ############################################

View File

@ -342,6 +342,21 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
&& docker-php-ext-enable aerospike \ && docker-php-ext-enable aerospike \
;fi ;fi
###########################################################################
# IonCube Loader:
###########################################################################
ARG INSTALL_IONCUBE=false
RUN if [ ${INSTALL_IONCUBE} = true ]; then \
# Install the php ioncube loader
curl -L -o /tmp/ioncube_loaders_lin_x86-64.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
&& tar zxpf /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp \
&& mv /tmp/ioncube/ioncube_loader_lin_${LARADOCK_PHP_VERSION}.so $(php -r "echo ini_get('extension_dir');")/ioncube_loader.so \
&& printf "zend_extension=ioncube_loader.so\n" > $PHP_INI_DIR/conf.d/0ioncube.ini \
&& rm -rf /tmp/ioncube* \
;fi
########################################################################### ###########################################################################
# Opcache: # Opcache:
########################################################################### ###########################################################################

View File

@ -397,6 +397,21 @@ RUN if [ ${INSTALL_LIBPNG} = true ]; then \
apt install libpng16-16 \ apt install libpng16-16 \
;fi ;fi
###########################################################################
# IonCube Loader
###########################################################################
ARG INSTALL_IONCUBE=false
RUN if [ ${INSTALL_IONCUBE} = true ]; then \
# Install the php ioncube loader
curl -L -o /tmp/ioncube_loaders_lin_x86-64.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
&& tar zxpf /tmp/ioncube_loaders_lin_x86-64.tar.gz -C /tmp \
&& mv /tmp/ioncube/ioncube_loader_lin_${LARADOCK_PHP_VERSION}.so $(php -r "echo ini_get('extension_dir');")/ioncube_loader.so \
&& echo "zend_extension=ioncube_loader.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/0ioncube.ini \
&& rm -rf /tmp/ioncube* \
;fi
########################################################################### ###########################################################################
# Drupal Console: # Drupal Console:
########################################################################### ###########################################################################