Skip to content

Commit aed9a20

Browse files
jackorpphracek
authored andcommitted
Require gcc-toolset-14 for nodejs-22 container.
Node.js 22's minimal GCC requirement is higher than the default GCC and GCC-C++ available on RHEL 8. It is reasonable from npm module developers to expect at least the minimal version node.js supports for compilation will be available to also compile the native extension from source. Therefore use and enable the gcc-toolset-14 collection inside container.
1 parent 51aaffb commit aed9a20

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

22/Dockerfile.rhel8

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ LABEL summary="$SUMMARY" \
5454
usage="s2i build <SOURCE-REPOSITORY> ubi8/$NAME-$NODEJS_VERSION:latest <APP-NAME>"
5555

5656
RUN dnf -y module enable nodejs:$NODEJS_VERSION && \
57-
MODULE_DEPS="make gcc gcc-c++ libatomic_ops git openssl-devel python3.12" && \
57+
MODULE_DEPS="make gcc-toolset-14-gcc gcc-toolset-14-gcc-c++ gcc-toolset-14-runtime \
58+
libatomic_ops git openssl-devel python3.12" && \
5859
INSTALL_PKGS="$MODULE_DEPS nodejs npm nodejs-nodemon nss_wrapper-libs which" && \
5960
ln -s /usr/lib/node_modules/nodemon/bin/nodemon.js /usr/bin/nodemon && \
6061
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
@@ -75,5 +76,10 @@ RUN chown -R 1001:0 ${APP_ROOT} && chmod -R ug+rwx ${APP_ROOT} && \
7576

7677
USER 1001
7778

79+
# Enable the SCL for all bash scripts.
80+
ENV BASH_ENV=/opt/rh/gcc-toolset-14/enable \
81+
ENV=/opt/rh/gcc-toolset-14/enable \
82+
PROMPT_COMMAND=". /opt/rh/gcc-toolset-14/enable"
83+
7884
# Set the default CMD to print the usage of the language image
7985
CMD $STI_SCRIPTS_PATH/usage

0 commit comments

Comments
 (0)