Skip to content

Commit

Permalink
Changes in Dockerfiles so they are a bit similar.
Browse files Browse the repository at this point in the history
Do not use yum, but rather dnf

Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Aug 15, 2024
1 parent 47136b6 commit 6dce4d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
13 changes: 6 additions & 7 deletions 3.3/Dockerfile.c10s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/sclorg/s2i-base-c9s:c9s
FROM quay.io/sclorg/s2i-base-c10s:c10s

# This image provides a Ruby environment you can use to run your Ruby
# applications.
Expand All @@ -12,7 +12,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}" \
IMAGE_NAME="sclorg/ruby-${RUBY_SCL_NAME_VERSION}-c10s" \
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. \
Expand All @@ -34,8 +34,7 @@ LABEL summary="$SUMMARY" \
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
maintainer="SoftwareCollections.org <[email protected]>"

RUN yum -y module enable ruby:$RUBY_VERSION && \
INSTALL_PKGS=" \
RUN INSTALL_PKGS=" \
libffi-devel \
ruby \
ruby-devel \
Expand All @@ -44,9 +43,9 @@ RUN yum -y module enable ruby:$RUBY_VERSION && \
ruby-bundled-gems \
redhat-rpm-config \
" && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
yum reinstall -y --setopt=tsflags=nodocs tzdata && \
yum -y clean all --enablerepo='*' && \
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
dnf reinstall -y --setopt=tsflags=nodocs tzdata && \
dnf -y clean all --enablerepo='*' && \
ruby -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
rpm -V ${INSTALL_PKGS}

Expand Down
8 changes: 4 additions & 4 deletions 3.3/Dockerfile.c9s
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ LABEL summary="$SUMMARY" \
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
maintainer="SoftwareCollections.org <[email protected]>"

RUN yum -y module enable ruby:$RUBY_VERSION && \
RUN dnf -y module enable ruby:$RUBY_VERSION && \
INSTALL_PKGS=" \
libffi-devel \
ruby \
Expand All @@ -44,9 +44,9 @@ RUN yum -y module enable ruby:$RUBY_VERSION && \
ruby-bundled-gems \
redhat-rpm-config \
" && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
yum reinstall -y --setopt=tsflags=nodocs tzdata && \
yum -y clean all --enablerepo='*' && \
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
dnf reinstall -y --setopt=tsflags=nodocs tzdata && \
dnf -y clean all --enablerepo='*' && \
ruby -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
rpm -V ${INSTALL_PKGS}

Expand Down
6 changes: 3 additions & 3 deletions 3.3/Dockerfile.rhel9
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ LABEL summary="$SUMMARY" \
--context-dir=${RUBY_VERSION}/test/puma-test-app/ ${IMAGE_NAME} ruby-sample-app" \
maintainer="SoftwareCollections.org <[email protected]>"

RUN yum -y module enable ruby:$RUBY_VERSION && \
RUN dnf -y module enable ruby:$RUBY_VERSION && \
INSTALL_PKGS=" \
libffi-devel \
ruby \
Expand All @@ -44,8 +44,8 @@ RUN yum -y module enable ruby:$RUBY_VERSION && \
ruby-bundled-gems \
redhat-rpm-config \
" && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
yum -y clean all --enablerepo='*' && \
dnf install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
dnf -y clean all --enablerepo='*' && \
ruby -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
rpm -V ${INSTALL_PKGS}

Expand Down

0 comments on commit 6dce4d7

Please sign in to comment.