Skip to content

Commit 3b4b825

Browse files
committed
Symlink the versioned binary to unversioned default.
The binaries in demodularized rubies were suffixed with the MAJOR.MINOR versioning. In these containers, provide the unversioned commands via a symlink.
1 parent ea3d4d6 commit 3b4b825

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

4.0/Dockerfile.c10s

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ RUN INSTALL_PKGS=" \
4646
ruby -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
4747
rpm -V ${INSTALL_PKGS}
4848

49+
# Symlink the binaries. Ruby now provides suffixed binaries in /usr/bin.
50+
# Provide the non-suffixed version in the container.
51+
RUN rpm -ql ruby4.0 ruby4.0-devel | \
52+
grep '/usr/bin' | \
53+
xargs basename | \
54+
xargs -I{} ln -s "/usr/bin/$(basename {} -s ${RUBY_VERSION})" "/usr/bin/{}"
55+
4956
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
5057
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
5158

4.0/Dockerfile.rhel10

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ RUN INSTALL_PKGS=" \
4545
ruby -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
4646
rpm -V ${INSTALL_PKGS}
4747

48+
# Symlink the binaries. Ruby now provides suffixed binaries in /usr/bin.
49+
# Provide the non-suffixed version in the container.
50+
RUN rpm -ql ruby4.0 ruby4.0-devel | \
51+
grep '/usr/bin' | \
52+
xargs basename | \
53+
xargs -I{} ln -s "/usr/bin/$(basename {} -s ${RUBY_VERSION})" "/usr/bin/{}"
54+
4855
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
4956
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
5057

0 commit comments

Comments
 (0)