Skip to content

Commit

Permalink
Readd version 2.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackorp committed Jun 11, 2021
1 parent ea41bb8 commit a213726
Show file tree
Hide file tree
Showing 32 changed files with 745 additions and 0 deletions.
Empty file added 2.7/.exclude-rhel8
Empty file.
68 changes: 68 additions & 0 deletions 2.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM quay.io/centos7/s2i-base-centos7

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

EXPOSE 8080

ENV RUBY_MAJOR_VERSION=2 \
RUBY_MINOR_VERSION=7

ENV RUBY_VERSION="${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" \
RUBY_SCL_NAME_VERSION="${RUBY_MAJOR_VERSION}${RUBY_MINOR_VERSION}"

# Set SCL related variables in Dockerfile so that the collection is enabled by default
ENV RUBY_SCL="rh-ruby${RUBY_SCL_NAME_VERSION}" \
IMAGE_NAME="centos7/ruby-${RUBY_SCL_NAME_VERSION}-centos7" \
SUMMARY="Platform for building and running Ruby $RUBY_VERSION applications" \
DESCRIPTION="Ruby $RUBY_VERSION available as container is a base platform for \
building and running various Ruby $RUBY_VERSION applications and frameworks. \
Ruby is the interpreted scripting language for quick and easy object-oriented programming. \
It has many features to process text files and to do system management tasks (as in Perl). \
It is simple, straight-forward, and extensible." \
PATH="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/bin:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/bin:/opt/rh/${NODEJS_SCL}/root/usr/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/lib64:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/lib64:/opt/rh/${NODEJS_SCL}/root/usr/lib64" \
X_SCLS="${NODEJS_SCL} rh-ruby${RUBY_SCL_NAME_VERSION}" \
MANPATH="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/share/man:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/share/man:/opt/rh/${NODEJS_SCL}/root/usr/share/man:" \
XDG_DATA_DIRS="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/share:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/share:/usr/local/share:/usr/share" \
PKG_CONFIG_PATH="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/lib64/pkgconfig:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/lib64/pkgconfig"

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Ruby ${RUBY_VERSION}" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,ruby,ruby${RUBY_SCL_NAME_VERSION},${RUBY_SCL}" \
com.redhat.component="${RUBY_SCL}-container" \
name="${IMAGE_NAME}" \
version="${RUBY_VERSION}" \
usage="s2i build https://github.com/sclorg/s2i-ruby-container.git \
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

RUN yum install -y centos-release-scl-rh && \
INSTALL_PKGS=" \
libffi-devel \
${RUBY_SCL} \
${RUBY_SCL}-ruby-devel \
${RUBY_SCL}-rubygem-rake \
${RUBY_SCL}-rubygem-bundler \
" && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
yum -y clean all --enablerepo='*' && \
rpm -V ${INSTALL_PKGS}

# 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/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN 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
51 changes: 51 additions & 0 deletions 2.7/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM registry.fedoraproject.org/f33/s2i-base

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

EXPOSE 8080

ENV NAME=ruby \
RUBY_VERSION=2.7 \
RUBY_SHORT_VER=27 \
VERSION=0

ENV SUMMARY="Platform for building and running Ruby $RUBY_VERSION applications" \
DESCRIPTION="Ruby $RUBY_VERSION available as container is a base platform for \
building and running various Ruby $RUBY_VERSION applications and frameworks. \
Ruby is the interpreted scripting language for quick and easy object-oriented programming. \
It has many features to process text files and to do system management tasks (as in Perl). \
It is simple, straight-forward, and extensible."

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Ruby ${RUBY_VERSION}" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,ruby,ruby${RUBY_SHORT_VER}" \
com.redhat.component="$NAME" \
name="$FGC/$NAME" \
version="$VERSION" \
usage="s2i build https://github.com/sclorg/s2i-ruby-container.git --context-dir=${RUBY_VERSION}/test/puma-test-app/ registry.fedoraproject.org/$FGC/ruby ruby-sample-app" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

# Install required packages
RUN INSTALL_PKGS="ruby ruby-devel rubygem-bundler rubygem-rake rubygems-devel redhat-rpm-config libffi-devel" && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
dnf clean all

# 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/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN 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
70 changes: 70 additions & 0 deletions 2.7/Dockerfile.rhel7
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
FROM rhscl/s2i-base-rhel7

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

EXPOSE 8080

ENV RUBY_MAJOR_VERSION=2 \
RUBY_MINOR_VERSION=7

ENV RUBY_VERSION="${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" \
RUBY_SCL_NAME_VERSION="${RUBY_MAJOR_VERSION}${RUBY_MINOR_VERSION}"

# Set SCL related variables in Dockerfile so that the collection is enabled by default
ENV RUBY_SCL="rh-ruby${RUBY_SCL_NAME_VERSION}" \
IMAGE_NAME="rhscl/ruby-${RUBY_SCL_NAME_VERSION}-rhel7" \
SUMMARY="Platform for building and running Ruby $RUBY_VERSION applications" \
DESCRIPTION="Ruby $RUBY_VERSION available as container is a base platform for \
building and running various Ruby $RUBY_VERSION applications and frameworks. \
Ruby is the interpreted scripting language for quick and easy object-oriented programming. \
It has many features to process text files and to do system management tasks (as in Perl). \
It is simple, straight-forward, and extensible." \
PATH="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/bin:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/bin:/opt/rh/${NODEJS_SCL}/root/usr/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/lib64:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/lib64:/opt/rh/${NODEJS_SCL}/root/usr/lib64" \
X_SCLS="${NODEJS_SCL} rh-ruby${RUBY_SCL_NAME_VERSION}" \
MANPATH="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/share/man:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/share/man:/opt/rh/${NODEJS_SCL}/root/usr/share/man:" \
XDG_DATA_DIRS="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/share:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/share:/usr/local/share:/usr/share" \
PKG_CONFIG_PATH="/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/local/lib64/pkgconfig:/opt/rh/rh-ruby${RUBY_SCL_NAME_VERSION}/root/usr/lib64/pkgconfig"

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Ruby ${RUBY_VERSION}" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,ruby,ruby${RUBY_SCL_NAME_VERSION},${RUBY_SCL}" \
com.redhat.component="${RUBY_SCL}-container" \
name="${IMAGE_NAME}" \
version="${RUBY_VERSION}" \
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
usage="s2i build https://github.com/sclorg/s2i-ruby-container.git \
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

RUN yum install -y yum-utils && \
prepare-yum-repositories rhel-server-rhscl-7-rpms && \
INSTALL_PKGS=" \
libffi-devel \
${RUBY_SCL} \
${RUBY_SCL}-ruby-devel \
${RUBY_SCL}-rubygem-rake \
${RUBY_SCL}-rubygem-bundler \
" && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
yum -y clean all --enablerepo='*' && \
rpm -V ${INSTALL_PKGS}

# 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/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN 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
63 changes: 63 additions & 0 deletions 2.7/Dockerfile.rhel8
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
FROM ubi8/s2i-base

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

EXPOSE 8080

ENV RUBY_MAJOR_VERSION=2 \
RUBY_MINOR_VERSION=7

ENV RUBY_VERSION="${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" \
RUBY_SCL_NAME_VERSION="${RUBY_MAJOR_VERSION}${RUBY_MINOR_VERSION}"

ENV RUBY_SCL="ruby-${RUBY_SCL_NAME_VERSION}" \
IMAGE_NAME="ubi8/ruby-${RUBY_SCL_NAME_VERSION}" \
SUMMARY="Platform for building and running Ruby $RUBY_VERSION applications" \
DESCRIPTION="Ruby $RUBY_VERSION available as container is a base platform for \
building and running various Ruby $RUBY_VERSION applications and frameworks. \
Ruby is the interpreted scripting language for quick and easy object-oriented programming. \
It has many features to process text files and to do system management tasks (as in Perl). \
It is simple, straight-forward, and extensible."

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Ruby ${RUBY_VERSION}" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,ruby,ruby${RUBY_SCL_NAME_VERSION},${RUBY_SCL}" \
com.redhat.component="${RUBY_SCL}-container" \
name="${IMAGE_NAME}" \
version="1" \
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
usage="s2i build https://github.com/sclorg/s2i-ruby-container.git \
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

RUN yum -y module enable ruby:$RUBY_VERSION && \
INSTALL_PKGS=" \
libffi-devel \
ruby \
ruby-devel \
rubygem-rake \
rubygem-bundler \
redhat-rpm-config \
" && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
yum -y clean all --enablerepo='*' && \
rpm -V ${INSTALL_PKGS}

# 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/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN 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
Loading

0 comments on commit a213726

Please sign in to comment.