We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a387a34 commit a478662Copy full SHA for a478662
php-hello-dockerfile/Dockerfile
@@ -0,0 +1,19 @@
1
+FROM registry.access.redhat.com/ubi8/ubi
2
+
3
+RUN yum --disableplugin=subscription-manager -y module enable php:7.2 \
4
+ && yum --disableplugin=subscription-manager -y install httpd php \
5
+ && yum --disableplugin=subscription-manager clean all
6
7
+ADD index.php /var/www/html
8
9
+RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf \
10
+ && mkdir /run/php-fpm \
11
+ && chgrp -R 0 /var/log/httpd /var/run/httpd /run/php-fpm \
12
+ && chmod -R g=u /var/log/httpd /var/run/httpd /run/php-fpm
13
14
+EXPOSE 8080
15
16
+USER 1001
17
18
+CMD php-fpm & httpd -D FOREGROUND
19
php-hello-dockerfile/index.php
@@ -0,0 +1,3 @@
+<?php
+print "Hello, World! PHP version is " . PHP_VERSION . "\n";
+?>
0 commit comments