-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.ubi9
More file actions
62 lines (57 loc) · 2.22 KB
/
Containerfile.ubi9
File metadata and controls
62 lines (57 loc) · 2.22 KB
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
54
55
56
57
58
59
60
61
62
FROM registry.redhat.io/ubi9/php-83
USER 0
RUN set -ex; \
rm -rf /etc/rhsm-host; \
sed -i 's/enabled=1/enabled=0/' /etc/dnf/plugins/subscription-manager.conf; \
dnf -y update; \
dnf -y install php-devel php-pecl-zip; \
dnf -y clean all; \
rm -rf /var/cache/dnf;
# Configure Apache mod_remoteip for proper client IP handling behind proxies
# https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html
RUN { \
echo 'RemoteIPHeader X-Forwarded-For'; \
echo '# Trust proxy IPs from private networks (Kubernetes/OpenShift)'; \
echo 'RemoteIPTrustedProxy 10.0.0.0/8'; \
echo 'RemoteIPTrustedProxy 172.16.0.0/12'; \
echo 'RemoteIPTrustedProxy 192.168.0.0/16'; \
echo 'RemoteIPTrustedProxy 169.254.0.0/16'; \
echo 'RemoteIPTrustedProxy 127.0.0.0/8'; \
} > /etc/httpd/conf.d/remoteip.conf
# 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 --no-check-certificate https://pecl.php.net/get/igbinary-3.2.16.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 --no-check-certificate https://pecl.php.net/get/msgpack-3.0.0.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 - needs igbinary headers ===== ;\
wget --no-check-certificate https://pecl.php.net/get/redis-6.3.0.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; \
: ===== cleanup ===== ;\
cd /tmp; \
rm -fR redis* igbinary* msgpack*
USER 1001