Skip to content

Commit

Permalink
Add Dockerfile.rhel8 for version 5.32
Browse files Browse the repository at this point in the history
Support start since May 2022

Closes: #306

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
  • Loading branch information
phracek committed Jun 26, 2024
1 parent d937017 commit 6910f17
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions 5.32/Dockerfile.rhel8
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
FROM ubi8/s2i-base:1

# This image provides a Perl 5.32 environment you can use to run your Perl applications.

EXPOSE 8080

# Image metadata
ENV PERL_VERSION=5.32 \
PERL_SHORT_VER=532 \
NAME=perl

ENV SUMMARY="Platform for building and running Perl $PERL_VERSION applications" \
DESCRIPTION="Perl $PERL_VERSION available as container is a base platform for \
building and running various Perl $PERL_VERSION applications and frameworks. \
Perl is a high-level programming language with roots in C, sed, awk and shell scripting. \
Perl is good at handling processes and files, and is especially good at handling text. \
Perl's hallmarks are practicality and efficiency. While it is used to do a lot of \
different things, Perl's most common applications are system administration utilities \
and web programming."

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Apache 2.4 with mod_fcgid and Perl $PERL_VERSION" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,${NAME},${NAME}${PERL_SHORT_VER}","${NAME}-${PERL_SHORT_VER}" \
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
io.s2i.scripts-url="image:///usr/libexec/s2i" \
name="ubi8/${NAME}-${PERL_SHORT_VER}" \
com.redhat.component="${NAME}-${PERL_SHORT_VER}-container" \
version="1" \
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>" \
help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
usage="s2i build <SOURCE-REPOSITORY> ubi8/${NAME}-${PERL_SHORT_VER}:latest <APP-NAME>"

# Deselect a default stream
RUN yum -y module reset perl

RUN INSTALL_PKGS="perl perl-devel mod_fcgid perl-App-cpanminus perl-FCGI patch" && \
yum -y module enable perl:$PERL_VERSION && \
yum -y --allowerasing distrosync && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
perl -v | grep -qe "v$PERL_VERSION\." && echo "Found VERSION $PERL_VERSION" && \
yum -y clean all --enablerepo='*'

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH

# Copy extra files to the image.
COPY ./root/ /

# In order to drop the root user, we have to make some directories world
# writeable as OpenShift default security model is to run the container under
# random UID.
RUN mkdir -p ${APP_ROOT}/etc/httpd.d && \
sed -i -f ${APP_ROOT}/etc/httpdconf.sed /etc/httpd/conf/httpd.conf && \
chmod -R og+rwx /var/run/httpd /run/mod_fcgid ${APP_ROOT}/etc/httpd.d && \
chown -R 1001:0 ${APP_ROOT} && chmod -R ug+rwx ${APP_ROOT} && \
rpm-file-permissions

USER 1001

# Set the default CMD to print the usage of the language image
CMD $STI_SCRIPTS_PATH/usage

0 comments on commit 6910f17

Please sign in to comment.