Skip to content

Commit 697cefb

Browse files
committed
distgen: Fully re-generate files.
1 parent 4b53622 commit 697cefb

19 files changed

Lines changed: 185 additions & 601 deletions

2.5/Dockerfile.rhel8

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,38 @@
1-
FROM ubi8/s2i-base
2-
31
# This image provides a Ruby environment you can use to run your Ruby
42
# applications.
3+
FROM registry.access.redhat.com/ubi8/s2i-base
54

65
EXPOSE 8080
76

8-
ENV RUBY_MAJOR_VERSION=2 \
9-
RUBY_MINOR_VERSION=5
10-
11-
ENV RUBY_VERSION="${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" \
12-
RUBY_SCL_NAME_VERSION="${RUBY_MAJOR_VERSION}${RUBY_MINOR_VERSION}"
7+
ENV RUBY_VERSION="2.5"
138

14-
ENV RUBY_SCL="ruby-${RUBY_SCL_NAME_VERSION}" \
15-
IMAGE_NAME="ubi8/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. \
9+
ENV RUBY_SCL="ruby-25" \
10+
IMAGE_NAME="ubi8/ruby-25" \
11+
SUMMARY="Platform for building and running Ruby 2.5 applications." \
12+
DESCRIPTION="Ruby 2.5 available as container is a base platform for \
13+
building and running various Ruby 2.5 applications and frameworks. \
1914
Ruby is the interpreted scripting language for quick and easy object-oriented programming. \
2015
It has many features to process text files and to do system management tasks (as in Perl). \
2116
It is simple, straight-forward, and extensible."
2217

2318
LABEL summary="$SUMMARY" \
2419
description="$DESCRIPTION" \
2520
io.k8s.description="$DESCRIPTION" \
26-
io.k8s.display-name="Ruby ${RUBY_VERSION}" \
21+
io.k8s.display-name="Ruby 2.5" \
2722
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}" \
23+
io.openshift.tags="builder,ruby,ruby25" \
24+
com.redhat.component="ruby-25-container" \
25+
name="ubi8/ruby-25" \
3126
version="1" \
3227
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
3328
usage="s2i build https://github.com/sclorg/s2i-ruby-container.git \
3429
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
3530
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
3631

37-
RUN yum -y module enable ruby:$RUBY_VERSION && \
38-
INSTALL_PKGS=" \
39-
libffi-devel \
40-
ruby \
41-
ruby-devel \
42-
rubygem-rake \
43-
rubygem-bundler \
44-
redhat-rpm-config \
45-
" && \
46-
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
47-
yum -y clean all --enablerepo='*' && \
32+
RUN INSTALL_PKGS="ruby ruby-devel rubygem-rake rubygem-bundler redhat-rpm-config libffi-devel" && \
33+
dnf module enable -y ruby:2.5 && \
34+
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
35+
dnf -y clean all --enablerepo='*' && \
4836
ruby -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
4937
rpm -V ${INSTALL_PKGS}
5038

2.5/README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
Ruby 2.5 container image
22
========================
33
This container image includes Ruby 2.5 as a [S2I](https://github.com/openshift/source-to-image) base image for your Ruby 2.5 applications.
4-
Only the RHEL8 based builder image is available.
5-
The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/).
4+
Users can choose between RHEL, CentOS Stream and Fedora based builder images.
5+
The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/),
6+
the CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg),
7+
and the Fedora images are available in [Quay.io](https://quay.io/organization/fedora).
68
The resulting image can be run using [podman](https://github.com/containers/libpod).
79

810
Note: while the examples in this README are calling `podman`, you can replace any such calls by `docker` with the same arguments
@@ -16,7 +18,7 @@ Ruby is the interpreted scripting language for quick and easy object-oriented pr
1618
It has many features to process text files and to do system management tasks (as in Perl).
1719
It is simple, straight-forward, and extensible.
1820

19-
This container image includes a npm utility, so users can use it to install JavaScript
21+
This container image includes an npm utility, so users can use it to install JavaScript
2022
modules for their web applications. There is no guarantee for any specific npm or nodejs
2123
version, that is included in the image; those versions can be changed anytime and
2224
the nodejs itself is included just to make the npm work.
@@ -25,7 +27,7 @@ See [the Red Hat Enterprise Linux Application Streams Life Cycle page](https://a
2527

2628
Usage in Openshift
2729
------------------
28-
For this, we will assume that you are using the `ubi8/ruby-25 image`, available via `ruby:2.5` imagestream tag in Openshift.
30+
For this, we will assume that you are using the `registry.access.redhat.com/ubi8/ruby-25` image, available via `ruby:2.5` imagestream tag in Openshift.
2931
Building a simple [ruby-sample-app](https://github.com/sclorg/s2i-ruby-container/tree/master/2.5/test/puma-test-app) application
3032
in Openshift can be achieved with the following step:
3133

@@ -41,7 +43,7 @@ $ oc exec <pod> -- curl 127.0.0.1:8080
4143

4244
Source-to-Image framework and scripts
4345
-------------------------------------
44-
This image supports the [Source-to-Image](https://docs.openshift.com/container-platform/4.14/openshift_images/create-images.html#images-create-s2i_create-images)
46+
This image supports the [Source-to-Image](https://docs.openshift.com/container-platform/4.4/builds/build-strategies.html#images-create-s2i_build-strategies)
4547
(S2I) strategy in OpenShift. The Source-to-Image is an OpenShift framework
4648
which makes it easy to write images that take application source code as
4749
an input, use a builder image like this Ruby container image, and produce
@@ -64,10 +66,10 @@ To use the Ruby image in a Dockerfile, follow these steps:
6466
#### 1. Pull a base builder image to build on
6567

6668
```
67-
podman pull ubi8/ruby-25
69+
podman pull registry.access.redhat.com/ubi8/ruby-25
6870
```
6971

70-
An RHEL8 image `ubi8/ruby-25` is used in this example.
72+
The `registry.access.redhat.com/ubi8/ruby-25` container image is used in this example.
7173

7274
#### 2. Pull and application code
7375

@@ -89,7 +91,7 @@ For all these three parts, users can use the Source-to-Image scripts inside the
8991

9092
##### 3.1 To use the Source-to-Image scripts and build an image using a Dockerfile, create a Dockerfile with this content:
9193
```
92-
FROM ubi8/ruby-25
94+
FROM registry.access.redhat.com/ubi8/ruby-25
9395
9496
# Add application sources to a directory that the assemble scriptexpects them
9597
# and set permissions so that the container runs without root access
@@ -110,7 +112,7 @@ CMD /usr/libexec/s2i/run
110112
The s2i scripts are used to set-up and run common Ruby applications. More information about the scripts can be found in [Source-to-Image](#source-to-image-framework-and-scripts) section.
111113
##### 3.2 To use your own setup, create a Dockerfile with this content:
112114
```
113-
FROM ubi8/ruby-25
115+
FROM registry.access.redhat.com/ubi8/ruby-25
114116
115117
USER 0
116118
ADD app-src ./
@@ -225,4 +227,6 @@ See also
225227
--------
226228
Dockerfile and other sources are available on https://github.com/sclorg/s2i-ruby-container.
227229
In that repository you also can find another versions of Ruby environment Dockerfiles.
228-
The Dockerfile for RHEL8 is called `Dockerfile.rhel8`.
230+
Dockerfile for RHEL8 is called `Dockerfile.rhel8`, for RHEL9 it's `Dockerfile.rhel9`,
231+
for CentOS Stream 9 it's `Dockerfile.c9s`, for CentOS Stream 10 it's `Dockerfile.c10s`,
232+
and the Fedora Dockerfile is called `Dockerfile.fedora`.

3.0/Dockerfile.c9s

Lines changed: 0 additions & 64 deletions
This file was deleted.

3.0/Dockerfile.rhel8

Lines changed: 0 additions & 64 deletions
This file was deleted.

3.0/Dockerfile.rhel9

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,37 @@
1-
FROM ubi9/s2i-base
2-
31
# This image provides a Ruby environment you can use to run your Ruby
42
# applications.
3+
FROM registry.access.redhat.com/ubi9/s2i-base
54

65
EXPOSE 8080
76

8-
ENV RUBY_MAJOR_VERSION=3 \
9-
RUBY_MINOR_VERSION=0
10-
11-
ENV RUBY_VERSION="${RUBY_MAJOR_VERSION}.${RUBY_MINOR_VERSION}" \
12-
RUBY_SCL_NAME_VERSION="${RUBY_MAJOR_VERSION}${RUBY_MINOR_VERSION}"
7+
ENV RUBY_VERSION="3.0"
138

14-
ENV RUBY_SCL="ruby-${RUBY_SCL_NAME_VERSION}" \
15-
IMAGE_NAME="ubi9/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. \
9+
ENV RUBY_SCL="ruby-30" \
10+
IMAGE_NAME="ubi9/ruby-30" \
11+
SUMMARY="Platform for building and running Ruby 3.0 applications." \
12+
DESCRIPTION="Ruby 3.0 available as container is a base platform for \
13+
building and running various Ruby 3.0 applications and frameworks. \
1914
Ruby is the interpreted scripting language for quick and easy object-oriented programming. \
2015
It has many features to process text files and to do system management tasks (as in Perl). \
2116
It is simple, straight-forward, and extensible."
2217

2318
LABEL summary="$SUMMARY" \
2419
description="$DESCRIPTION" \
2520
io.k8s.description="$DESCRIPTION" \
26-
io.k8s.display-name="Ruby ${RUBY_VERSION}" \
21+
io.k8s.display-name="Ruby 3.0" \
2722
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}" \
23+
io.openshift.tags="builder,ruby,ruby30" \
24+
com.redhat.component="ruby-30-container" \
25+
name="ubi9/ruby-30" \
3126
version="1" \
3227
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
3328
usage="s2i build https://github.com/sclorg/s2i-ruby-container.git \
3429
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
3530
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
3631

37-
RUN INSTALL_PKGS=" \
38-
libffi-devel \
39-
ruby \
40-
ruby-devel \
41-
rubygem-rake \
42-
rubygem-bundler \
43-
redhat-rpm-config \
44-
" && \
45-
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
46-
yum -y clean all --enablerepo='*' && \
32+
RUN INSTALL_PKGS="ruby ruby-devel rubygem-rake rubygem-bundler redhat-rpm-config libffi-devel" && \
33+
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
34+
dnf -y clean all --enablerepo='*' && \
4735
ruby -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
4836
rpm -V ${INSTALL_PKGS}
4937

0 commit comments

Comments
 (0)