From dbaf9c3bef366b962a03cbdc3308713d099f918a Mon Sep 17 00:00:00 2001 From: yabinami Date: Tue, 22 Jul 2025 21:25:16 +0200 Subject: [PATCH 1/4] kolani test --- nodejs-helloworld/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs-helloworld/package.json b/nodejs-helloworld/package.json index 338e1f7ead..7f81a8929f 100644 --- a/nodejs-helloworld/package.json +++ b/nodejs-helloworld/package.json @@ -9,6 +9,6 @@ "author": "Red Hat Training", "license": "ASL", "dependencies": { - "express" "4.14.x" + "express":"4.14.x" } } From cfb55382e4fef22975b9ca071133afd0796ced79 Mon Sep 17 00:00:00 2001 From: yabinami <64131690+yabinami@users.noreply.github.com> Date: Mon, 28 Jul 2025 22:02:35 +0200 Subject: [PATCH 2/4] Update Containerfile --- container-build/Containerfile | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/container-build/Containerfile b/container-build/Containerfile index 30d07537b3..5665809ffc 100644 --- a/container-build/Containerfile +++ b/container-build/Containerfile @@ -1,2 +1,29 @@ # Use the httpd-parent image as base -FROM quay.io/redhattraining/httpd-parent +#FROM quay.io/redhattraining/httpd-parent + +FROM registry.access.redhat.com/ubi8/ubi:8.0 + +LABEL value="1.0" +LABEL description="Application for container optimize" + +MAINTAINER Red Hat Training + +# DocumentRoot for Apache + +ENV DOCROOT=/var/www/html + +RUN yum install -y --no-docs --disableplugin=subscription-manager httpd +RUN yum clean all --disableplugin=subscription-manager -y +RUN echo "Hello from the httpd-parent container!" > ${DOCROOT}/index.html + +# Allows child images +EXPOSE 80 + +# This stuff is needed to ensure a clean start +RUN rm -rf /run/httpd + +RUN mkdir /run/httpd +# Run as the rroot user + USER root +# Launch httpd + CMD /usr/sbin/httpd -DFOREGROUND From f9f6dd2ee5146027027752186eba086c12733858 Mon Sep 17 00:00:00 2001 From: yabinami Date: Mon, 28 Jul 2025 22:30:47 +0200 Subject: [PATCH 3/4] change image --- container-build/Containerfile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/container-build/Containerfile b/container-build/Containerfile index 5665809ffc..20120f4ff8 100644 --- a/container-build/Containerfile +++ b/container-build/Containerfile @@ -3,26 +3,24 @@ FROM registry.access.redhat.com/ubi8/ubi:8.0 -LABEL value="1.0" -LABEL description="Application for container optimize" - -MAINTAINER Red Hat Training +LABEL value="1.0" description="Application for container optimize" maintainer="Red Hat Training " # DocumentRoot for Apache -ENV DOCROOT=/var/www/html +#ENV DOCROOT=/var/www/html -RUN yum install -y --no-docs --disableplugin=subscription-manager httpd -RUN yum clean all --disableplugin=subscription-manager -y -RUN echo "Hello from the httpd-parent container!" > ${DOCROOT}/index.html +RUN yum install -y --disableplugin=subscription-manager httpd && \ + yum clean all --disableplugin=subscription-manager -y && \ + echo "Hello from the httpd-parent container!" > /var/www/html/index.html + #echo "Hello from the httpd-parent container!" > ${DOCROOT}/index.html # Allows child images EXPOSE 80 +ONBUILD COPY ./src/ /var/www/html # This stuff is needed to ensure a clean start -RUN rm -rf /run/httpd - -RUN mkdir /run/httpd +RUN rm -rf /run/httpd && \ + mkdir /run/httpd # Run as the rroot user USER root # Launch httpd From 8a20917987578252fe552ccce24d61ecd240e91f Mon Sep 17 00:00:00 2001 From: yabinami Date: Fri, 1 Aug 2025 11:25:51 +0200 Subject: [PATCH 4/4] add Dockerfile --- container-build/Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 container-build/Dockerfile diff --git a/container-build/Dockerfile b/container-build/Dockerfile new file mode 100644 index 0000000000..20120f4ff8 --- /dev/null +++ b/container-build/Dockerfile @@ -0,0 +1,27 @@ +# Use the httpd-parent image as base +#FROM quay.io/redhattraining/httpd-parent + +FROM registry.access.redhat.com/ubi8/ubi:8.0 + +LABEL value="1.0" description="Application for container optimize" maintainer="Red Hat Training " + +# DocumentRoot for Apache + +#ENV DOCROOT=/var/www/html + +RUN yum install -y --disableplugin=subscription-manager httpd && \ + yum clean all --disableplugin=subscription-manager -y && \ + echo "Hello from the httpd-parent container!" > /var/www/html/index.html + #echo "Hello from the httpd-parent container!" > ${DOCROOT}/index.html + +# Allows child images +EXPOSE 80 + +ONBUILD COPY ./src/ /var/www/html +# This stuff is needed to ensure a clean start +RUN rm -rf /run/httpd && \ + mkdir /run/httpd +# Run as the rroot user + USER root +# Launch httpd + CMD /usr/sbin/httpd -DFOREGROUND