diff --git a/php74/Dockerfile b/php74/Dockerfile new file mode 100644 index 0000000..e76d95c --- /dev/null +++ b/php74/Dockerfile @@ -0,0 +1,47 @@ +FROM outrigger/apache-php-base + +RUN yum -y install \ + https://rpms.remirepo.net/enterprise/remi-release-7.rpm && \ + yum -y install \ + gcc-c++ \ + make \ + php74 \ + php74-php-bcmath \ + php74-php-devel \ + php74-php-fpm \ + php74-php-gd \ + php74-php-mbstring \ + php74-php-mcrypt \ + php74-php-pecl-memcached \ + php74-php-mysql \ + php74-php-mysqlnd \ + php74-php-opcache \ + php74-php-pdo \ + php74-php-pecl-xdebug \ + php74-php-xml \ + php74-php-pecl-yaml \ + php74-php-pecl-zip && \ + # There is no PHP 7 support for XHProf yet. + # php74-php-pecl-xhprof + yum clean all + +ENV PHP_HOME /opt/remi/php74 +RUN ln -sfv ${PHP_HOME}/root/usr/bin/* /usr/bin/ && \ + ln -sfv ${PHP_HOME}/root/usr/sbin/* /usr/sbin/ && \ + ln -sfv /dev/stderr /var${PHP_HOME}/log/php-fpm/error.log + +# Install phpredis +ENV PHPREDIS_VERSION 3.1.5 +RUN curl -L -o /tmp/phpredis.tar.gz "https://github.com/phpredis/phpredis/archive/$PHPREDIS_VERSION.tar.gz" && \ + tar -xzf /tmp/phpredis.tar.gz -C /tmp && \ + rm /tmp/phpredis.tar.gz && \ + cd "/tmp/phpredis-$PHPREDIS_VERSION" && \ + phpize && \ + ./configure && \ + make && \ + make install && \ + # Clean up build dependencies. + yum -y remove gcc-c++ make php74-php-devel && \ + yum clean all + +COPY root / diff --git a/php74/root/etc/confd/conf.d/www.toml b/php74/root/etc/confd/conf.d/www.toml new file mode 100644 index 0000000..2bb2ec0 --- /dev/null +++ b/php74/root/etc/confd/conf.d/www.toml @@ -0,0 +1,7 @@ +[template] +src = "www.conf.tmpl" +dest = "/etc/opt/remi/php74/php-fpm.d/www.conf" +uid = 0 +gid = 0 +mode = "0644" +keys = [] diff --git a/php74/root/etc/confd/conf.d/xdebug.ini.toml b/php74/root/etc/confd/conf.d/xdebug.ini.toml new file mode 100644 index 0000000..7130869 --- /dev/null +++ b/php74/root/etc/confd/conf.d/xdebug.ini.toml @@ -0,0 +1,7 @@ +[template] +src = "xdebug.ini.tmpl" +dest = "/etc/opt/remi/php74/php.d/15-xdebug.ini" +uid = 0 +gid = 0 +mode = "0644" +keys = [] diff --git a/php74/root/etc/confd/conf.d/xhprof.ini.toml b/php74/root/etc/confd/conf.d/xhprof.ini.toml new file mode 100644 index 0000000..69189ed --- /dev/null +++ b/php74/root/etc/confd/conf.d/xhprof.ini.toml @@ -0,0 +1,7 @@ +[template] +src = "xhprof.ini.tmpl" +dest = "/etc/opt/remi/php74/php.d/15-xhprof.ini" +uid = 0 +gid = 0 +mode = "0644" +keys = [] diff --git a/php74/root/etc/confd/conf.d/yaml.ini.toml b/php74/root/etc/confd/conf.d/yaml.ini.toml new file mode 100644 index 0000000..cb9c3ee --- /dev/null +++ b/php74/root/etc/confd/conf.d/yaml.ini.toml @@ -0,0 +1,7 @@ +[template] +src = "yaml.ini.tmpl" +dest = "/etc/opt/remi/php74/php.d/40-yaml.ini" +uid = 0 +gid = 0 +mode = "0644" +keys = [] diff --git a/php74/root/etc/fix-attrs.d/01-apache-logs-dir b/php74/root/etc/fix-attrs.d/01-apache-logs-dir new file mode 100644 index 0000000..6dbe137 --- /dev/null +++ b/php74/root/etc/fix-attrs.d/01-apache-logs-dir @@ -0,0 +1 @@ +/var/log/httpd true apache 0644 0755 diff --git a/php74/root/etc/opt/remi/php74/php.d/90-redis.ini b/php74/root/etc/opt/remi/php74/php.d/90-redis.ini new file mode 100644 index 0000000..6aecae4 --- /dev/null +++ b/php74/root/etc/opt/remi/php74/php.d/90-redis.ini @@ -0,0 +1 @@ +extension=redis.so diff --git a/php74/root/etc/services.d/php-fpm/run b/php74/root/etc/services.d/php-fpm/run new file mode 100644 index 0000000..85be78d --- /dev/null +++ b/php74/root/etc/services.d/php-fpm/run @@ -0,0 +1,3 @@ +#!/usr/bin/with-contenv sh + +exec php-fpm -F -R