OSBS can automatically bump the release number, for that we just need to drop the label from the Dockerfile See https://pagure.io/ContainerSIG/container-sig/issue/1 Signed-off-by: Clement Verna <cverna@tutanota.com>
69 lines
2.1 KiB
Docker
69 lines
2.1 KiB
Docker
FROM registry.fedoraproject.org/fedora:29
|
|
|
|
# Port on which will apache run
|
|
EXPOSE 8080
|
|
|
|
# Image metadata
|
|
ENV NAME=perl \
|
|
PERL_VERSION=5.24 \
|
|
VERSION=0 \
|
|
ARCH=x86_64
|
|
|
|
# Set labels used in OpenShift to describe the builder images
|
|
LABEL com.redhat.component="$NAME" \
|
|
name="$FGC/$NAME" \
|
|
summary="Perl 5 is a highly capable, feature-rich programming language." \
|
|
description="Perl 5 is a highly capable, feature-rich programming language with over 29 years of development. Perl 5 runs on over 100 platforms." \
|
|
version="$VERSION" \
|
|
architecture="$ARCH" \
|
|
usage="s2i build file:///your/app modularitycontainers/perl your-app" \
|
|
io.k8s.description="Platform for building and running Perl 5.24 applications" \
|
|
io.k8s.display-name="Apache 2.4 with mod_perl/5.24" \
|
|
io.openshift.expose-services="8080:http" \
|
|
io.openshift.tags="builder,perl,perl524" \
|
|
io.openshift.s2i.scripts-url=image:///usr/local/s2i
|
|
|
|
# Perl and build tools install + user addition
|
|
|
|
RUN BUILD_TOOlS="bsdtar \
|
|
findutils \
|
|
gcc \
|
|
make \
|
|
gettext \
|
|
tar \
|
|
wget \
|
|
python " && \
|
|
dnf install -y --setopt=tsflags=nodocs perl perl-devel mod_perl cpan cpanminus httpd \
|
|
$BUILD_TOOlS && \
|
|
dnf clean all && \
|
|
mkdir -p /opt/app-root/src/ && \
|
|
useradd -u 1001 -r -g 0 -d /opt/app-root/src -s /sbin/nologin \
|
|
-c "Default Application User" default && \
|
|
chown -R 1001:0 /opt/app-root
|
|
|
|
# Copy s2i files
|
|
COPY ./s2i/bin/ /usr/local/s2i
|
|
|
|
# Copy apache configuration
|
|
COPY ./contrib/ /opt/app-root
|
|
|
|
# Drop the root user
|
|
RUN mkdir -p /opt/app-root/etc/httpd.d && \
|
|
sed -i -f /opt/app-root/etc/httpdconf.sed etc/httpd/conf/httpd.conf && \
|
|
chmod -R og+rwx /var/run/httpd /opt/app-root/etc/httpd.d && \
|
|
chown -R 1001:0 /opt/app-root && chmod -R ug+rwx /opt/app-root
|
|
|
|
USER 1001
|
|
|
|
# Copy executable utilities.
|
|
COPY bin/ /usr/bin/
|
|
|
|
# Copy help file
|
|
COPY root/help.1 /
|
|
|
|
# Directory with the sources is set as the working directory so all STI scripts
|
|
# can execute relative to this path.
|
|
WORKDIR /opt/app-root/src
|
|
|
|
# Set the default command to print the usage
|
|
CMD /usr/local/s2i/usage
|