From a478662e00a38e2a1424381009c053b9787914d0 Mon Sep 17 00:00:00 2001 From: Fernando Lozano Date: Tue, 11 Jun 2019 17:57:36 -0300 Subject: [PATCH] sources for custom image from chapter 01 --- php-hello-dockerfile/Dockerfile | 19 +++++++++++++++++++ php-hello-dockerfile/index.php | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 php-hello-dockerfile/Dockerfile create mode 100644 php-hello-dockerfile/index.php diff --git a/php-hello-dockerfile/Dockerfile b/php-hello-dockerfile/Dockerfile new file mode 100644 index 0000000..14982ce --- /dev/null +++ b/php-hello-dockerfile/Dockerfile @@ -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 + diff --git a/php-hello-dockerfile/index.php b/php-hello-dockerfile/index.php new file mode 100644 index 0000000..e04de63 --- /dev/null +++ b/php-hello-dockerfile/index.php @@ -0,0 +1,3 @@ +