Skip to content

Instantly share code, notes, and snippets.

@zengpuzhang
Created July 2, 2019 03:40
Show Gist options
  • Save zengpuzhang/f5efd0aed601e843a1d6050fd59f69cb to your computer and use it in GitHub Desktop.
Save zengpuzhang/f5efd0aed601e843a1d6050fd59f69cb to your computer and use it in GitHub Desktop.
php 5.6 install zendguardloader in docker
FROM php:5.6
# install ioncube
RUN mkdir /tmp/ioncube && \
cd /tmp/ioncube && \
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && \
tar xvf ioncube_loaders_lin_x86-64.tar.gz && \
cd `php -i | grep extension_dir | cut -d' ' -f 5` && \
cp /tmp/ioncube/ioncube/ioncube_loader_lin_5.6.so . && \
echo zend_extension=ioncube_loader_lin_5.6.so > /etc/php5/apache2/conf.d/00-ioncube.ini && \
rm -rf /tmp/ioncube/
# install zend guard loader
RUN mkdir /tmp/zendguardloader && \
cd /tmp/zendguardloader && \
wget http://downloads.zend.com/guard/7.0.0/zend-loader-php5.6-linux-x86_64.tar.gz && \
tar xvf zend-loader-php5.6-linux-x86_64.tar.gz && \
cd `php -i | grep extension_dir | cut -d' ' -f 5` && \
cp /tmp/zendguardloader/zend-loader-php5.6-linux-x86_64/ZendGuardLoader.so . && \
cp /tmp/zendguardloader/zend-loader-php5.6-linux-x86_64/opcache.so . && \
echo zend_extension=ZendGuardLoader.so > /etc/php5/apache2/conf.d/10-zendguardloader.ini && \
echo zend_extension=opcache.so > /etc/php5/apache2/conf.d/20-zendopcache.ini && \
rm -rf /tmp/zendguardloader/
# enable apache modules
RUN /usr/sbin/a2enmod rewrite && /usr/sbin/a2enmod headers && /usr/sbin/a2enmod expires
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment