summaryrefslogtreecommitdiffstats
path: root/ubi8-remi-php56-fpm.dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'ubi8-remi-php56-fpm.dockerfile')
-rw-r--r--ubi8-remi-php56-fpm.dockerfile30
1 files changed, 30 insertions, 0 deletions
diff --git a/ubi8-remi-php56-fpm.dockerfile b/ubi8-remi-php56-fpm.dockerfile
new file mode 100644
index 0000000..0cc9fb7
--- /dev/null
+++ b/ubi8-remi-php56-fpm.dockerfile
@@ -0,0 +1,30 @@
+FROM registry.access.redhat.com/ubi8:latest
+
+## Build
+# podman build -t php56 -f ubi8-remi-php56-fpm.dockerfile .
+
+## Run
+# podman run --mount type=bind,src=/var/www/html,dst=/var/www/html -p 127.0.0.1:9056:9000 --rm -ti php56
+
+## Usage
+# in httpd conf: SetHandler "proxy:fcgi://127.0.0.1:9056"
+
+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 install php56 php56-php-fpm php56-php-mysqli php56-php-mbstring php56-php-json \
+ && dnf clean all
+
+RUN mkdir /var/run/php-fpm
+
+RUN sed -e '/^listen/s/=.*$/= 9000/' \
+ -e '/^listen.allowed_clients/s/^/## /' \
+ -e '/^;catch_workers_output/s/^;//' \
+ -e '/error_log/d' \
+ -e '/wsdl_cache_dir/d' \
+ -i /etc/opt/remi/php56/php-fpm.d/www.conf
+
+RUN echo "date.timezone = Europe/Paris" > /etc/opt/remi/php56/php.d/date.ini
+
+ENTRYPOINT ["/opt/remi/php56/root/usr/sbin/php-fpm"]
+CMD ["--nodaemonize"]
+