summaryrefslogtreecommitdiffstats
path: root/ubi8-php73-redis.dockerfile
blob: c89340ae1043296d17bfbab1520e6fbb6625bb8f (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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"]