summaryrefslogtreecommitdiffstats
path: root/ubi8-remi-php56-fpm.dockerfile
blob: 0cc9fb75b39b3df7b74de6524b347816f756167f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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"]