diff --git a/container-build/Containerfile b/container-build/Containerfile index 30d07537b3..5e919368d7 100644 --- a/container-build/Containerfile +++ b/container-build/Containerfile @@ -1,2 +1,21 @@ -# Use the httpd-parent image as base +# Use the redhattraining/httpd-parent image as base FROM quay.io/redhattraining/httpd-parent + +# Change the port to 8080 +EXPOSE 8080 + +# Labels consumed by OpenShift +LABEL io.k8s.description="A basic Apache HTTP Server child image, uses ONBUILD" \ + io.k8s.display-name="Apache HTTP Server" \ + io.openshift.expose-services="8080:http" \ + io.openshift.tags="apache, httpd" + +# Change web server port to 8080 +RUN sed -i "s/Listen 80/Listen 8080/g" /etc/httpd/conf/httpd.conf + +# Permissions to allow container to run on OpenShift +RUN chgrp -R 0 /var/log/httpd /var/run/httpd && \ + chmod -R g=u /var/log/httpd /var/run/httpd + +# Run as a non-privileged user +USER 1001 diff --git a/nodejs-helloworld/package.json b/nodejs-helloworld/package.json index 338e1f7ead..ed91722d3d 100644 --- a/nodejs-helloworld/package.json +++ b/nodejs-helloworld/package.json @@ -1,7 +1,7 @@ { "name": "nodejs-helloworld", "version": "1.0.0", - "description": "Hello World!", + "description": "Hello World! DO288 app testing", "main": "app.js", "scripts": { "start": "node app.js" @@ -9,6 +9,6 @@ "author": "Red Hat Training", "license": "ASL", "dependencies": { - "express" "4.14.x" + "express": "4.14.x" } } diff --git a/s2i-scripts/.s2i/bin/assemble b/s2i-scripts/.s2i/bin/assemble index 7e87289759..602046b187 100644 --- a/s2i-scripts/.s2i/bin/assemble +++ b/s2i-scripts/.s2i/bin/assemble @@ -11,12 +11,16 @@ config_s2i ######## CUSTOMIZATION STARTS HERE ############ echo "---> Installing application source" + cp -Rf /tmp/src/*.html ./ +DATE=date "+%F" +echo $DATE >> ./info.html +echo "Astra inclinant, sed non obligant" >> ./info.html -DATE=`date "+%b %d, %Y @ %H:%M %p"` +#DATE=`date "+%F @ %H:%M %p"` echo "---> Creating info page" -echo "Page built on $DATE" >> ./info.html +echo "This Page built on $DATE" >> ./info.html echo "Proudly served by Apache HTTP Server version $HTTPD_VERSION" >> ./info.html ######## CUSTOMIZATION ENDS HERE ############