Skip to content

Commit 00e1eaa

Browse files
committed
Add Dockerfile.rhel10 for version 3.3 in order to support building and testing
container in RHEL10 Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent e9d17bb commit 00e1eaa

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

3.3/Dockerfile.rhel10

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
FROM registry.stage.redhat.io/ubi10/s2i-base
2+
3+
# This image provides a Ruby environment you can use to run your Ruby
4+
# applications.
5+
6+
EXPOSE 8080
7+
8+
ENV RUBY_MAJOR_VERSION=3 \
9+
RUBY_MINOR_VERSION=3
10+
11+
ENV RUBY_VERSION="${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" \
12+
RUBY_SCL_NAME_VERSION="${RUBY_MAJOR_VERSION}${RUBY_MINOR_VERSION}"
13+
14+
ENV RUBY_SCL="ruby-${RUBY_SCL_NAME_VERSION}" \
15+
IMAGE_NAME="ubi10/ruby-${RUBY_SCL_NAME_VERSION}" \
16+
SUMMARY="Platform for building and running Ruby $RUBY_VERSION applications" \
17+
DESCRIPTION="Ruby $RUBY_VERSION available as container is a base platform for \
18+
building and running various Ruby $RUBY_VERSION applications and frameworks. \
19+
Ruby is the interpreted scripting language for quick and easy object-oriented programming. \
20+
It has many features to process text files and to do system management tasks (as in Perl). \
21+
It is simple, straight-forward, and extensible."
22+
23+
LABEL summary="$SUMMARY" \
24+
description="$DESCRIPTION" \
25+
io.k8s.description="$DESCRIPTION" \
26+
io.k8s.display-name="Ruby ${RUBY_VERSION}" \
27+
io.openshift.expose-services="8080:http" \
28+
io.openshift.tags="builder,ruby,ruby${RUBY_SCL_NAME_VERSION},${RUBY_SCL}" \
29+
com.redhat.component="${RUBY_SCL}-container" \
30+
name="${IMAGE_NAME}" \
31+
version="1" \
32+
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
33+
usage="s2i build https://github.com/sclorg/s2i-ruby-container.git \
34+
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
35+
maintainer="SoftwareCollections.org <[email protected]>"
36+
37+
RUN INSTALL_PKGS=" \
38+
libffi-devel \
39+
ruby \
40+
ruby-devel \
41+
rubygem-rake \
42+
rubygem-bundler \
43+
ruby-bundled-gems \
44+
redhat-rpm-config \
45+
" && \
46+
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
47+
dnf reinstall -y --setopt=tsflags=nodocs tzdata && \
48+
dnf -y clean all --enablerepo='*' && \
49+
ruby -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
50+
rpm -V ${INSTALL_PKGS}
51+
52+
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
53+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
54+
55+
# Copy extra files to the image.
56+
COPY ./root/ /
57+
58+
# Drop the root user and make the content of /opt/app-root owned by user 1001
59+
RUN chown -R 1001:0 ${APP_ROOT} && chmod -R ug+rwx ${APP_ROOT} && \
60+
rpm-file-permissions
61+
62+
USER 1001
63+
64+
# Set the default CMD to print the usage of the language image
65+
CMD $STI_SCRIPTS_PATH/usage

0 commit comments

Comments
 (0)