diff --git a/container-build/Containerfile b/container-build/Containerfile index 30d07537b3..20120f4ff8 100644 --- a/container-build/Containerfile +++ b/container-build/Containerfile @@ -1,2 +1,27 @@ # 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" 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 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 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" } }