commit
f36a40825a
7 changed files with 56 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||
#FROM registry.redhat.io/rhel8/httpd-24 |
|||
FROM centos/httpd-24-centos7 |
|||
|
|||
# Add application sources to a directory where the assemble script expects them |
|||
# and set permissions so that the container runs without the root access |
|||
USER 0 |
|||
ADD local.conf /etc/httpd/conf.d/ |
|||
USER 1001 |
|||
|
|||
# Let the assemble script install the dependencies |
|||
#RUN /usr/libexec/s2i/assemble |
|||
|
|||
# The run script uses standard ways to run the application |
|||
CMD /usr/libexec/s2i/run |
|||
|
|||
@ -0,0 +1,5 @@ |
|||
LoadModule proxy_module modules/mod_proxy.so |
|||
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so |
|||
<VirtualHost *:8080> |
|||
ProxyPassMatch ^/info$ fcgi://sample-php-fpm.dns.podman:9000/opt/app-root/src/index.php |
|||
</VirtualHost> |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/sh |
|||
|
|||
set -Eeuo pipefail |
|||
|
|||
podman build -t sample-apache . |
|||
podman run --rm --name sample-apache sample-apache |
|||
|
|||
@ -0,0 +1,6 @@ |
|||
FROM ubi8/php-74 |
|||
ADD src . |
|||
USER 0 |
|||
RUN mkdir -p /run/php-fpm && chown 1001:0 /run/php-fpm |
|||
USER 1001 |
|||
CMD /usr/libexec/s2i/run |
|||
@ -0,0 +1,7 @@ |
|||
#!/bin/sh |
|||
|
|||
set -Eeuo pipefail |
|||
|
|||
podman build -t sample-php-fpm . |
|||
podman run --rm --name sample-php-fpm sample-php-fpm |
|||
|
|||
@ -0,0 +1,6 @@ |
|||
<?php |
|||
|
|||
// Show all information, defaults to INFO_ALL |
|||
phpinfo(); |
|||
|
|||
?> |
|||
@ -0,0 +1,10 @@ |
|||
#!/bin/sh |
|||
|
|||
# Listen on port 9000 |
|||
echo "Opening port 9000..." |
|||
sed -i 's/^listen *= *.*/listen = 0.0.0.0:9000/' /etc/php-fpm.d/www.conf |
|||
sed -i 's/^listen.allowed_clients *= *.*/listen.allowed_clients = /' /etc/php-fpm.d/www.conf |
|||
|
|||
# Start PHP-FPM |
|||
exec /usr/sbin/php-fpm --nodaemonize -d error_log=/dev/fd/2 -d log_level=debug |
|||
|
|||
Loading…
Reference in new issue