sources for custom image from chapter 01
This commit is contained in:
parent
a387a34d24
commit
a478662e00
2 changed files with 22 additions and 0 deletions
19
php-hello-dockerfile/Dockerfile
Normal file
19
php-hello-dockerfile/Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
FROM registry.access.redhat.com/ubi8/ubi
|
||||
|
||||
RUN yum --disableplugin=subscription-manager -y module enable php:7.2 \
|
||||
&& yum --disableplugin=subscription-manager -y install httpd php \
|
||||
&& yum --disableplugin=subscription-manager clean all
|
||||
|
||||
ADD index.php /var/www/html
|
||||
|
||||
RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf \
|
||||
&& mkdir /run/php-fpm \
|
||||
&& chgrp -R 0 /var/log/httpd /var/run/httpd /run/php-fpm \
|
||||
&& chmod -R g=u /var/log/httpd /var/run/httpd /run/php-fpm
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
USER 1001
|
||||
|
||||
CMD php-fpm & httpd -D FOREGROUND
|
||||
|
||||
3
php-hello-dockerfile/index.php
Normal file
3
php-hello-dockerfile/index.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
print "Hello, World! PHP version is " . PHP_VERSION . "\n";
|
||||
?>
|
||||
Loading…
Add table
Reference in a new issue