Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ jobs:
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"

- dockerfile: "24/Dockerfile.c10s"
docker_context: 24
registry_namespace: "sclorg"
tag: "c10s"
image_name: "nodejs-24-c10s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"

- dockerfile: "24-minimal/Dockerfile.c10s"
docker_context: 24-minimal
registry_namespace: "sclorg"
tag: "c10s"
image_name: "nodejs-24-minimal-c10s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"

- dockerfile: "18/Dockerfile.fedora"
docker_context: 18
registry_namespace: "fedora"
Expand Down Expand Up @@ -94,6 +110,22 @@ jobs:
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "nodejs-22-minimal"

- dockerfile: "24/Dockerfile.fedora"
docker_context: 24
registry_namespace: "fedora"
tag: "fedora"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "nodejs-24"

- dockerfile: "24-minimal/Dockerfile.fedora"
docker_context: 24-minimal
registry_namespace: "fedora"
tag: "fedora"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "nodejs-24-minimal"

steps:
- name: Build and push to quay.io registry
uses: sclorg/build-and-push-action@v4
Expand Down
Empty file added 24-minimal/.exclude-c10s
Empty file.
Empty file added 24-minimal/.exclude-c8s
Empty file.
Empty file added 24-minimal/.exclude-c9s
Empty file.
Empty file added 24-minimal/.exclude-rhel10
Empty file.
Empty file added 24-minimal/.exclude-rhel8
Empty file.
Empty file added 24-minimal/.exclude-rhel9
Empty file.
67 changes: 67 additions & 0 deletions 24-minimal/Dockerfile.c10s
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
FROM quay.io/sclorg/s2i-core-c10s

EXPOSE 8080

# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
# available on the CLI without using npm's --global installation mode
# This image will be initialized with "npm run $NPM_RUN"
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
# file for possible values of NPM_RUN
# Description
# Environment:
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
# Expose ports:
# * 8080 - Unprivileged port used by nodejs application
ENV APP_ROOT=/opt/app-root \
# The $HOME is not set by default, but some applications need this variable
HOME=/opt/app-root/src \
NPM_RUN=start \
PLATFORM="el10" \
NODEJS_VERSION=24 \
NPM_RUN=start \
NAME=nodejs

ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
running various Node.js $NODEJS_VERSION applications and frameworks. \
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
that run across distributed devices." \
NPM_CONFIG_PREFIX=$HOME/.npm-global \
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Node.js $NODEJS_VERSION Micro" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
io.s2i.scripts-url="image:///usr/libexec/s2i" \
com.redhat.dev-mode="DEV_MODE:false" \
com.redhat.deployments-dir="${APP_ROOT}/src" \
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
name="sclorg/$NAME-$NODEJS_VERSION-minimal-c10s" \
version="1" \
maintainer="SoftwareCollections.org <[email protected]>" \
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"

# nodejs-full-i18n is included for error strings
RUN INSTALL_PKGS="nodejs$NODEJS_VERSION nodejs-nodemon nodejs$NODEJS_VERSION-full-i18n npm findutils tar which" && \
dnf -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
node-24 -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
dnf clean all && \
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*

COPY ./s2i/bin/ /usr/libexec/s2i
RUN chmod +x /usr/libexec/s2i/init-wrapper

# Copy extra files to the image.
COPY ./root/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
WORKDIR "$HOME"
USER 1001
69 changes: 69 additions & 0 deletions 24-minimal/Dockerfile.c8s
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
FROM quay.io/sclorg/s2i-core-c8s

EXPOSE 8080

# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
# available on the CLI without using npm's --global installation mode
# This image will be initialized with "npm run $NPM_RUN"
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
# file for possible values of NPM_RUN
# Description
# Environment:
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
# Expose ports:
# * 8080 - Unprivileged port used by nodejs application
ENV APP_ROOT=/opt/app-root \
# The $HOME is not set by default, but some applications need this variable
HOME=/opt/app-root/src \
NPM_RUN=start \
PLATFORM="el8" \
NODEJS_VERSION=20 \
NPM_RUN=start \
NAME=nodejs

ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
running various Node.js $NODEJS_VERSION applications and frameworks. \
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
that run across distributed devices." \
NPM_CONFIG_PREFIX=$HOME/.npm-global \
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Node.js $NODEJS_VERSION Minimal" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
io.s2i.scripts-url="image:///usr/libexec/s2i" \
com.redhat.dev-mode="DEV_MODE:false" \
com.redhat.deployments-dir="${APP_ROOT}/src" \
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
name="sclorg/$NAME-$NODEJS_VERSION-minimal-c8s" \
version="1" \
maintainer="SoftwareCollections.org <[email protected]>" \
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"

# nodejs-full-i18n is included for error strings
RUN INSTALL_PKGS="nodejs nodejs-nodemon nodejs-full-i18n npm findutils tar which" && \
yum -y module disable nodejs && \
yum -y module enable nodejs:$NODEJS_VERSION && \
yum -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
yum clean all && \
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*

COPY ./s2i/bin/ /usr/libexec/s2i
RUN chmod +x /usr/libexec/s2i/init-wrapper

# Copy extra files to the image.
COPY ./root/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
WORKDIR "$HOME"
USER 1001
69 changes: 69 additions & 0 deletions 24-minimal/Dockerfile.c9s
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
FROM quay.io/sclorg/s2i-core-c9s

EXPOSE 8080

# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
# available on the CLI without using npm's --global installation mode
# This image will be initialized with "npm run $NPM_RUN"
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
# file for possible values of NPM_RUN
# Description
# Environment:
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
# Expose ports:
# * 8080 - Unprivileged port used by nodejs application
ENV APP_ROOT=/opt/app-root \
# The $HOME is not set by default, but some applications need this variable
HOME=/opt/app-root/src \
NPM_RUN=start \
PLATFORM="el9" \
NODEJS_VERSION=24 \
NPM_RUN=start \
NAME=nodejs

ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
running various Node.js $NODEJS_VERSION applications and frameworks. \
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
that run across distributed devices." \
NPM_CONFIG_PREFIX=$HOME/.npm-global \
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Node.js $NODEJS_VERSION Micro" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
io.s2i.scripts-url="image:///usr/libexec/s2i" \
com.redhat.dev-mode="DEV_MODE:false" \
com.redhat.deployments-dir="${APP_ROOT}/src" \
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
name="sclorg/$NAME-$NODEJS_VERSION-minimal-c9s" \
version="1" \
maintainer="SoftwareCollections.org <[email protected]>" \
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"

# nodejs-full-i18n is included for error strings
RUN INSTALL_PKGS="nodejs nodejs-nodemon nodejs-full-i18n npm findutils tar which" && \
yum -y module disable nodejs && \
yum -y module enable nodejs:$NODEJS_VERSION && \
yum -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
yum clean all && \
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*

COPY ./s2i/bin/ /usr/libexec/s2i
RUN chmod +x /usr/libexec/s2i/init-wrapper

# Copy extra files to the image.
COPY ./root/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
WORKDIR "$HOME"
USER 1001
71 changes: 71 additions & 0 deletions 24-minimal/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
FROM quay.io/fedora/fedora-minimal:42

EXPOSE 8080

# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
# available on the CLI without using npm's --global installation mode
# This image will be initialized with "npm run $NPM_RUN"
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
# file for possible values of NPM_RUN
# Description
# Environment:
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
# Expose ports:
# * 8080 - Unprivileged port used by nodejs application
ENV APP_ROOT=/opt/app-root \
# The $HOME is not set by default, but some applications need this variable
HOME=/opt/app-root/src \
NPM_RUN=start \
PLATFORM="fedora" \
NODEJS_VERSION=24 \
NPM_RUN=start \
NAME=nodejs

ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
running various Node.js $NODEJS_VERSION applications and frameworks. \
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
that run across distributed devices." \
NPM_CONFIG_PREFIX=$HOME/.npm-global \
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Node.js $NODEJS_VERSION Micro" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
io.s2i.scripts-url="image:///usr/libexec/s2i" \
com.redhat.dev-mode="DEV_MODE:false" \
com.redhat.deployments-dir="${APP_ROOT}/src" \
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
name="fedora/$NAME-$NODEJS_VERSION-minimal" \
version="1" \
maintainer="SoftwareCollections.org <[email protected]>" \
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"

# nodejs-full-i18n is included for error strings
RUN INSTALL_PKGS="nodejs$NODEJS_VERSION nodejs-nodemon nodejs$NODEJS_VERSION-full-i18n nodejs$NODEJS_VERSION-npm findutils tar which nss_wrapper-libs" && \
microdnf -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
microdnf clean all && \
ln -s /usr/bin/node-$NODEJS_VERSION /usr/bin/node && \
ln -s /usr/bin/npm-$NODEJS_VERSION /usr/bin/npm && \
ln -s /usr/bin/npx-$NODEJS_VERSION /usr/bin/npx && \
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*

#
COPY ./s2i/bin/ /usr/libexec/s2i
RUN chmod +x /usr/libexec/s2i/init-wrapper

# Copy extra files to the image.
COPY ./root/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
WORKDIR "$HOME"
USER 1001
68 changes: 68 additions & 0 deletions 24-minimal/Dockerfile.rhel10
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM ubi10-minimal:latest

EXPOSE 8080

# Add $HOME/node_modules/.bin to the $PATH, allowing user to make npm scripts
# available on the CLI without using npm's --global installation mode
# This image will be initialized with "npm run $NPM_RUN"
# See https://docs.npmjs.com/misc/scripts, and your repo's package.json
# file for possible values of NPM_RUN
# Description
# Environment:
# * $NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section (default: npm run "start").
# Expose ports:
# * 8080 - Unprivileged port used by nodejs application
ENV APP_ROOT=/opt/app-root \
# The $HOME is not set by default, but some applications need this variable
HOME=/opt/app-root/src \
NPM_RUN=start \
PLATFORM="el10" \
NODEJS_VERSION=24 \
NPM_RUN=start \
NAME=nodejs

ENV SUMMARY="Minimal image for running Node.js $NODEJS_VERSION applications" \
DESCRIPTION="Node.js $NODEJS_VERSION available as container is a base platform for \
running various Node.js $NODEJS_VERSION applications and frameworks. \
Node.js is a platform built on Chrome's JavaScript runtime for easily building \
fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model \
that makes it lightweight and efficient, perfect for data-intensive real-time applications \
that run across distributed devices." \
NPM_CONFIG_PREFIX=$HOME/.npm-global \
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Node.js $NODEJS_VERSION Micro" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,$NAME,${NAME}${NODEJS_VERSION}" \
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
io.s2i.scripts-url="image:///usr/libexec/s2i" \
com.redhat.dev-mode="DEV_MODE:false" \
com.redhat.deployments-dir="${APP_ROOT}/src" \
com.redhat.dev-mode.port="DEBUG_PORT:5858" \
com.redhat.component="${NAME}-${NODEJS_VERSION}-minimal-container" \
name="ubi9/$NAME-$NODEJS_VERSION-minimal" \
version="1" \
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
maintainer="SoftwareCollections.org <[email protected]>" \
help="For more information visit https://github.com/sclorg/s2i-nodejs-container"

# nodejs-full-i18n is included for error strings
RUN INSTALL_PKGS="nodejs nodejs-nodemon nodejs-full-i18n npm findutils tar which" && \
microdnf -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
microdnf clean all && \
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*

COPY ./s2i/bin/ /usr/libexec/s2i
RUN chmod +x /usr/libexec/s2i/init-wrapper

# Copy extra files to the image.
COPY ./root/ /

# Drop the root user and make the content of /opt/app-root owned by user 1001
RUN mkdir -p "$HOME" && chown -R 1001:0 "$APP_ROOT" && chmod -R ug+rwx "$APP_ROOT"
WORKDIR "$HOME"
USER 1001
Loading