diff options
-rw-r--r-- | ubi8-php73-redis.dockerfile | 53 | ||||
-rw-r--r-- | ubi8-php74.dockerfile | 8 |
2 files changed, 59 insertions, 2 deletions
diff --git a/ubi8-php73-redis.dockerfile b/ubi8-php73-redis.dockerfile new file mode 100644 index 0000000..c89340a --- /dev/null +++ b/ubi8-php73-redis.dockerfile @@ -0,0 +1,53 @@ +FROM registry.access.redhat.com/ubi8/php-73 + +USER 0 + +RUN set -ex; \ + dnf -y module reset nodejs; \ + dnf -y module enable nodejs:12; \ + dnf -y update; \ + dnf -y install php-devel php-pecl-zip; \ + dnf -y clean all; \ + rm -rf /var/cache/dnf + +# Install redis for PHP session handling and common caching +# https://github.com/phpredis/phpredis/blob/develop/INSTALL.markdown +RUN set -ex; \ + cd /tmp; \ + : =====igbinary ===== ;\ + wget https://pecl.php.net/get/igbinary-3.1.4.tgz; \ + tar -zxf igbinary-*.tgz; \ + rm igbinary-*.tgz; \ + cd igbinary-*; \ + phpize; \ + ./configure; \ + make -j4 && make install; \ + echo -e "; Enable igbinary extension module\nextension = igbinary.so" > /etc/php.d/40-igbinary.ini; \ + cd ..; \ + : ===== msgpack ===== ;\ + wget https://pecl.php.net/get/msgpack-2.1.1.tgz; \ + tar -zxf msgpack-*.tgz; \ + rm msgpack-*.tgz; \ + cd msgpack-*; \ + phpize; \ + ./configure; \ + make -j4 && make install; \ + echo -e "; Enable msgpack extension module\nextension = msgpack.so" > /etc/php.d/40-msgpack.ini; \ + cd ..; \ + : ===== redis ===== ;\ + wget https://pecl.php.net/get/redis-5.3.1.tgz; \ + tar -zxf redis-*.tgz; \ + rm redis-*.tgz; \ + cd redis-*; \ + phpize; \ + ./configure --enable-redis-igbinary --enable-redis-msgpack --enable-redis-lzf;\ + make -j4 && make install; \ + echo -e "; Enable redis extension module\nextension = redis.so" > /etc/php.d/50-redis.ini; \ + cd ..; \ + : ===== cleanup ===== ;\ + rm -fR redis* igbinary* msgpack* + +USER 1001 +ENTRYPOINT ["php"] +CMD ["-a"] + diff --git a/ubi8-php74.dockerfile b/ubi8-php74.dockerfile index 0e8c1e9..73e7520 100644 --- a/ubi8-php74.dockerfile +++ b/ubi8-php74.dockerfile @@ -3,8 +3,12 @@ FROM registry.access.redhat.com/ubi8:latest RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ https://rpms.remirepo.net/enterprise/remi-release-8.rpm && \ dnf -y module enable php:remi-7.4 && \ - dnf -y install httpd php php-cli php-common php-sodium php-json php-mbstring php-xml && \ - dnf clean all + dnf -y install httpd php php-cli php-common \ + php-sodium \ + php-json \ + php-mbstring \ + php-xml \ + && dnf clean all ENTRYPOINT ["php"] CMD ["-a"] |