Skip to content

Commit 3bb9ea8

Browse files
committed
Add Node.js 24 (2/3 - copy 24->22)
1 parent 8472f11 commit 3bb9ea8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2255
-0
lines changed

22-minimal/.exclude-c8s

Whitespace-only changes.

22-minimal/.exclude-c9s

Whitespace-only changes.

22-minimal/Dockerfile.c10s

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
FROM quay.io/sclorg/s2i-core-c10s
2+
3+
EXPOSE 8080
4+
5+
# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
6+
# available on the CLI without using npm's --global installation mode
7+
# This image will be initialized with "npm run $NPM_RUN"
8+
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
9+
# file for possible values of NPM_RUN
10+
# Description
11+
# Environment:
12+
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
13+
# Expose ports:
14+
# * 8080 - Unprivileged port used by nodejs application
15+
ENV APP_ROOT=/opt/app-root \
16+
# The $HOME is not set by default, but some applications need this variable
17+
HOME=/opt/app-root/src \
18+
NPM_RUN=start \
19+
PLATFORM="el10" \
20+
NODEJS_VERSION=22 \
21+
NPM_RUN=start \
22+
NAME=nodejs
23+
24+
ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
25+
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
26+
running various Node.js $NODEJS_VERSION applications and frameworks. \
27+
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
28+
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
29+
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
30+
that run across distributed devices." \
31+
NPM_CONFIG_PREFIX=$HOME/.npm-global \
32+
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH
33+
34+
LABEL summary="$SUMMARY" \
35+
description="$DESCRIPTION" \
36+
io.k8s.description="$DESCRIPTION" \
37+
io.k8s.display-name="Node.js $NODEJS_VERSION Micro" \
38+
io.openshift.expose-services="8080:http" \
39+
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
40+
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
41+
io.s2i.scripts-url="image:///usr/libexec/s2i" \
42+
com.redhat.dev-mode="DEV_MODE:false" \
43+
com.redhat.deployments-dir="${APP_ROOT}/src" \
44+
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
45+
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
46+
name="sclorg/$NAME-$NODEJS_VERSION-minimal-c10s" \
47+
version="1" \
48+
maintainer="SoftwareCollections.org <[email protected]>" \
49+
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"
50+
51+
# nodejs-full-i18n is included for error strings
52+
RUN INSTALL_PKGS="nodejs$NODEJS_VERSION nodejs-nodemon nodejs$NODEJS_VERSION-full-i18n npm findutils tar which" && \
53+
dnf -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
54+
node-22 -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
55+
dnf clean all && \
56+
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
57+
58+
COPY ./s2i/bin/ /usr/libexec/s2i
59+
RUN chmod +x /usr/libexec/s2i/init-wrapper
60+
61+
# Copy extra files to the image.
62+
COPY ./root/ /
63+
64+
# Drop the root user and make the content of /opt/app-root owned by user 1001
65+
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
66+
WORKDIR "$HOME"
67+
USER 1001

22-minimal/Dockerfile.c8s

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
FROM quay.io/sclorg/s2i-core-c8s
2+
3+
EXPOSE 8080
4+
5+
# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
6+
# available on the CLI without using npm's --global installation mode
7+
# This image will be initialized with "npm run $NPM_RUN"
8+
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
9+
# file for possible values of NPM_RUN
10+
# Description
11+
# Environment:
12+
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
13+
# Expose ports:
14+
# * 8080 - Unprivileged port used by nodejs application
15+
ENV APP_ROOT=/opt/app-root \
16+
# The $HOME is not set by default, but some applications need this variable
17+
HOME=/opt/app-root/src \
18+
NPM_RUN=start \
19+
PLATFORM="el8" \
20+
NODEJS_VERSION=20 \
21+
NPM_RUN=start \
22+
NAME=nodejs
23+
24+
ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
25+
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
26+
running various Node.js $NODEJS_VERSION applications and frameworks. \
27+
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
28+
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
29+
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
30+
that run across distributed devices." \
31+
NPM_CONFIG_PREFIX=$HOME/.npm-global \
32+
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH
33+
34+
LABEL summary="$SUMMARY" \
35+
description="$DESCRIPTION" \
36+
io.k8s.description="$DESCRIPTION" \
37+
io.k8s.display-name="Node.js $NODEJS_VERSION Minimal" \
38+
io.openshift.expose-services="8080:http" \
39+
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
40+
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
41+
io.s2i.scripts-url="image:///usr/libexec/s2i" \
42+
com.redhat.dev-mode="DEV_MODE:false" \
43+
com.redhat.deployments-dir="${APP_ROOT}/src" \
44+
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
45+
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
46+
name="sclorg/$NAME-$NODEJS_VERSION-minimal-c8s" \
47+
version="1" \
48+
maintainer="SoftwareCollections.org <[email protected]>" \
49+
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"
50+
51+
# nodejs-full-i18n is included for error strings
52+
RUN INSTALL_PKGS="nodejs nodejs-nodemon nodejs-full-i18n npm findutils tar which" && \
53+
yum -y module disable nodejs && \
54+
yum -y module enable nodejs:$NODEJS_VERSION && \
55+
yum -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
56+
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
57+
yum clean all && \
58+
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
59+
60+
COPY ./s2i/bin/ /usr/libexec/s2i
61+
RUN chmod +x /usr/libexec/s2i/init-wrapper
62+
63+
# Copy extra files to the image.
64+
COPY ./root/ /
65+
66+
# Drop the root user and make the content of /opt/app-root owned by user 1001
67+
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
68+
WORKDIR "$HOME"
69+
USER 1001

22-minimal/Dockerfile.c9s

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
FROM quay.io/sclorg/s2i-core-c9s
2+
3+
EXPOSE 8080
4+
5+
# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
6+
# available on the CLI without using npm's --global installation mode
7+
# This image will be initialized with "npm run $NPM_RUN"
8+
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
9+
# file for possible values of NPM_RUN
10+
# Description
11+
# Environment:
12+
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
13+
# Expose ports:
14+
# * 8080 - Unprivileged port used by nodejs application
15+
ENV APP_ROOT=/opt/app-root \
16+
# The $HOME is not set by default, but some applications need this variable
17+
HOME=/opt/app-root/src \
18+
NPM_RUN=start \
19+
PLATFORM="el9" \
20+
NODEJS_VERSION=22 \
21+
NPM_RUN=start \
22+
NAME=nodejs
23+
24+
ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
25+
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
26+
running various Node.js $NODEJS_VERSION applications and frameworks. \
27+
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
28+
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
29+
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
30+
that run across distributed devices." \
31+
NPM_CONFIG_PREFIX=$HOME/.npm-global \
32+
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH
33+
34+
LABEL summary="$SUMMARY" \
35+
description="$DESCRIPTION" \
36+
io.k8s.description="$DESCRIPTION" \
37+
io.k8s.display-name="Node.js $NODEJS_VERSION Micro" \
38+
io.openshift.expose-services="8080:http" \
39+
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
40+
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
41+
io.s2i.scripts-url="image:///usr/libexec/s2i" \
42+
com.redhat.dev-mode="DEV_MODE:false" \
43+
com.redhat.deployments-dir="${APP_ROOT}/src" \
44+
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
45+
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
46+
name="sclorg/$NAME-$NODEJS_VERSION-minimal-c9s" \
47+
version="1" \
48+
maintainer="SoftwareCollections.org <[email protected]>" \
49+
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"
50+
51+
# nodejs-full-i18n is included for error strings
52+
RUN INSTALL_PKGS="nodejs nodejs-nodemon nodejs-full-i18n npm findutils tar which" && \
53+
yum -y module disable nodejs && \
54+
yum -y module enable nodejs:$NODEJS_VERSION && \
55+
yum -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
56+
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
57+
yum clean all && \
58+
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
59+
60+
COPY ./s2i/bin/ /usr/libexec/s2i
61+
RUN chmod +x /usr/libexec/s2i/init-wrapper
62+
63+
# Copy extra files to the image.
64+
COPY ./root/ /
65+
66+
# Drop the root user and make the content of /opt/app-root owned by user 1001
67+
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
68+
WORKDIR "$HOME"
69+
USER 1001

22-minimal/Dockerfile.fedora

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
FROM quay.io/fedora/fedora-minimal:40
2+
3+
EXPOSE 8080
4+
5+
# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
6+
# available on the CLI without using npm's --global installation mode
7+
# This image will be initialized with "npm run $NPM_RUN"
8+
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
9+
# file for possible values of NPM_RUN
10+
# Description
11+
# Environment:
12+
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
13+
# Expose ports:
14+
# * 8080 - Unprivileged port used by nodejs application
15+
ENV APP_ROOT=/opt/app-root \
16+
# The $HOME is not set by default, but some applications need this variable
17+
HOME=/opt/app-root/src \
18+
NPM_RUN=start \
19+
PLATFORM="fedora" \
20+
NODEJS_VERSION=22 \
21+
NPM_RUN=start \
22+
NAME=nodejs
23+
24+
ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
25+
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
26+
running various Node.js $NODEJS_VERSION applications and frameworks. \
27+
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
28+
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
29+
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
30+
that run across distributed devices." \
31+
NPM_CONFIG_PREFIX=$HOME/.npm-global \
32+
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH
33+
34+
LABEL summary="$SUMMARY" \
35+
description="$DESCRIPTION" \
36+
io.k8s.description="$DESCRIPTION" \
37+
io.k8s.display-name="Node.js $NODEJS_VERSION Micro" \
38+
io.openshift.expose-services="8080:http" \
39+
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
40+
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
41+
io.s2i.scripts-url="image:///usr/libexec/s2i" \
42+
com.redhat.dev-mode="DEV_MODE:false" \
43+
com.redhat.deployments-dir="${APP_ROOT}/src" \
44+
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
45+
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
46+
name="fedora/$NAME-$NODEJS_VERSION-minimal" \
47+
version="1" \
48+
maintainer="SoftwareCollections.org <[email protected]>" \
49+
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"
50+
51+
# nodejs-full-i18n is included for error strings
52+
RUN INSTALL_PKGS="nodejs$NODEJS_VERSION nodejs-nodemon nodejs$NODEJS_VERSION-full-i18n nodejs$NODEJS_VERSION-npm findutils tar which nss_wrapper-libs" && \
53+
microdnf -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
54+
microdnf clean all && \
55+
ln -s /usr/bin/node-$NODEJS_VERSION /usr/bin/node && \
56+
ln -s /usr/bin/npm-$NODEJS_VERSION /usr/bin/npm && \
57+
ln -s /usr/bin/npx-$NODEJS_VERSION /usr/bin/npx && \
58+
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
59+
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
60+
61+
#
62+
COPY ./s2i/bin/ /usr/libexec/s2i
63+
RUN chmod +x /usr/libexec/s2i/init-wrapper
64+
65+
# Copy extra files to the image.
66+
COPY ./root/ /
67+
68+
# Drop the root user and make the content of /opt/app-root owned by user 1001
69+
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
70+
WORKDIR "$HOME"
71+
USER 1001

22-minimal/Dockerfile.rhel10

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
FROM ubi10-minimal:latest
2+
3+
EXPOSE 8080
4+
5+
# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
6+
# available on the CLI without using npm's --global installation mode
7+
# This image will be initialized with "npm run $NPM_RUN"
8+
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
9+
# file for possible values of NPM_RUN
10+
# Description
11+
# Environment:
12+
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
13+
# Expose ports:
14+
# * 8080 - Unprivileged port used by nodejs application
15+
ENV APP_ROOT=/opt/app-root \
16+
# The $HOME is not set by default, but some applications need this variable
17+
HOME=/opt/app-root/src \
18+
NPM_RUN=start \
19+
PLATFORM="el10" \
20+
NODEJS_VERSION=22 \
21+
NPM_RUN=start \
22+
NAME=nodejs
23+
24+
ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
25+
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
26+
running various Node.js $NODEJS_VERSION applications and frameworks. \
27+
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
28+
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
29+
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
30+
that run across distributed devices." \
31+
NPM_CONFIG_PREFIX=$HOME/.npm-global \
32+
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH
33+
34+
LABEL summary="$SUMMARY" \
35+
description="$DESCRIPTION" \
36+
io.k8s.description="$DESCRIPTION" \
37+
io.k8s.display-name="Node.js $NODEJS_VERSION Micro" \
38+
io.openshift.expose-services="8080:http" \
39+
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
40+
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
41+
io.s2i.scripts-url="image:///usr/libexec/s2i" \
42+
com.redhat.dev-mode="DEV_MODE:false" \
43+
com.redhat.deployments-dir="${APP_ROOT}/src" \
44+
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
45+
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
46+
name="ubi9/$NAME-$NODEJS_VERSION-minimal" \
47+
version="1" \
48+
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
49+
maintainer="SoftwareCollections.org <[email protected]>" \
50+
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"
51+
52+
# nodejs-full-i18n is included for error strings
53+
RUN INSTALL_PKGS="nodejs nodejs-nodemon nodejs-full-i18n npm findutils tar which" && \
54+
microdnf -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
55+
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
56+
microdnf clean all && \
57+
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
58+
59+
COPY ./s2i/bin/ /usr/libexec/s2i
60+
RUN chmod +x /usr/libexec/s2i/init-wrapper
61+
62+
# Copy extra files to the image.
63+
COPY ./root/ /
64+
65+
# Drop the root user and make the content of /opt/app-root owned by user 1001
66+
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
67+
WORKDIR "$HOME"
68+
USER 1001

0 commit comments

Comments
 (0)