Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updatea #322

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion container-build/Containerfile
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions nodejs-helloworld/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "nodejs-helloworld",
"version": "1.0.0",
"description": "Hello World!",
"description": "Hello World! DO288 app testing",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"author": "Red Hat Training",
"license": "ASL",
"dependencies": {
"express" "4.14.x"
"express": "4.14.x"
}
}
8 changes: 6 additions & 2 deletions s2i-scripts/.s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -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 ############
Expand Down