summaryrefslogtreecommitdiffstats
path: root/ubi8-php73-redis.dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'ubi8-php73-redis.dockerfile')
-rw-r--r--ubi8-php73-redis.dockerfile53
1 files changed, 53 insertions, 0 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"]
+