Skip to content
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
27 changes: 26 additions & 1 deletion container-build/Containerfile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"

# 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
27 changes: 27 additions & 0 deletions container-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"

# 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
2 changes: 1 addition & 1 deletion nodejs-helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"author": "Red Hat Training",
"license": "ASL",
"dependencies": {
"express" "4.14.x"
"express":"4.14.x"
}
}