From f136a27eeb1db9a33736479907945ef7318d2b07 Mon Sep 17 00:00:00 2001 From: SUSE Update Bot Date: Wed, 8 Jan 2025 05:05:46 +0000 Subject: [PATCH] Test build for #2169 --- .obs/workflows.yml | 7 +++ nodejs-22-image/Dockerfile | 57 ++++++++++++++++++++++++ nodejs-22-image/README.md | 59 +++++++++++++++++++++++++ nodejs-22-image/_service | 9 ++++ nodejs-22-image/nodejs-22-image.changes | 4 ++ 5 files changed, 136 insertions(+) create mode 100644 nodejs-22-image/Dockerfile create mode 100644 nodejs-22-image/README.md create mode 100644 nodejs-22-image/_service create mode 100644 nodejs-22-image/nodejs-22-image.changes diff --git a/.obs/workflows.yml b/.obs/workflows.yml index 1ac124384..a3147c374 100644 --- a/.obs/workflows.yml +++ b/.obs/workflows.yml @@ -133,6 +133,10 @@ staging_build: source_project: home:defolos:BCI:CR:SLE-15-SP6 source_package: nodejs-20-image target_project: home:defolos:BCI:CR:SLE-15-SP6:Staging + - branch_package: + source_project: home:defolos:BCI:CR:SLE-15-SP6 + source_package: nodejs-22-image + target_project: home:defolos:BCI:CR:SLE-15-SP6:Staging - branch_package: source_project: home:defolos:BCI:CR:SLE-15-SP6 source_package: openjdk-21-image @@ -353,6 +357,9 @@ refresh_devel_BCI: - trigger_services: project: devel:BCI:SLE-15-SP6 package: nodejs-20-image + - trigger_services: + project: devel:BCI:SLE-15-SP6 + package: nodejs-22-image - trigger_services: project: devel:BCI:SLE-15-SP6 package: openjdk-21-image diff --git a/nodejs-22-image/Dockerfile b/nodejs-22-image/Dockerfile new file mode 100644 index 000000000..cfd478f60 --- /dev/null +++ b/nodejs-22-image/Dockerfile @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: MIT + +# Copyright (c) 2025 SUSE LLC + +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. + +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. +# It is maintained by the BCI team and generated by +# https://github.com/SUSE/BCI-dockerfile-generator + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# You can contact the BCI team via https://github.com/SUSE/bci/discussions + +#!UseOBSRepositories + +#!BuildTag: bci/nodejs:%%nodejs_version%%-%RELEASE% +#!BuildTag: bci/nodejs:%%nodejs_version%% +#!BuildTag: bci/nodejs:22 +#!BuildTag: bci/node:%%nodejs_version%%-%RELEASE% +#!BuildTag: bci/node:%%nodejs_version%% +#!BuildTag: bci/node:22 +#!BuildName: bci-nodejs-22 +#!BuildVersion: 15.6.22 +#!BuildRelease: 30 +FROM registry.suse.com/bci/bci-base:15.6 + +RUN set -euo pipefail; \ + zypper -n install --no-recommends nodejs22 npm22 update-alternatives curl findutils gawk git-core procps; \ + zypper -n clean; \ + rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2} + +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=com.suse.bci.nodejs +LABEL org.opencontainers.image.authors="https://github.com/SUSE/bci/discussions" +LABEL org.opencontainers.image.title="SLE BCI Node.js 22 development" +LABEL org.opencontainers.image.description="Node.js 22 development container based on the SLE Base Container Image." +LABEL org.opencontainers.image.version="%%nodejs_version%%" +LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="SUSE LLC" +LABEL org.opencontainers.image.source="%SOURCEURL%" +LABEL org.opencontainers.image.ref.name="%%nodejs_version%%-%RELEASE%" +LABEL org.opensuse.reference="registry.suse.com/bci/nodejs:%%nodejs_version%%-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL com.suse.supportlevel="l3" +LABEL com.suse.supportlevel.until="2027-04-30" +LABEL com.suse.eula="sle-bci" +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15" +LABEL com.suse.release-stage="released" +# endlabelprefix +LABEL org.opencontainers.image.base.name="%BASE_REFNAME%" +LABEL org.opencontainers.image.base.digest="%BASE_DIGEST%" +LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md" +ENV NODE_VERSION="22" + diff --git a/nodejs-22-image/README.md b/nodejs-22-image/README.md new file mode 100644 index 000000000..df0d6df45 --- /dev/null +++ b/nodejs-22-image/README.md @@ -0,0 +1,59 @@ +# Node.js 22 development container image + +![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green)[![SLSA](https://img.shields.io/badge/SLSA_(v1.0)-Build_L3-Green)](https://documentation.suse.com/sbp/server-linux/html/SBP-SLSA4/) +[![Provenance: Available](https://img.shields.io/badge/Provenance-Available-Green)](https://documentation.suse.com/container/all/html/Container-guide/index.html#container-verify) + +## Description + +[Node.js](https://nodejs.org/) is a free, open-source, cross-platform JavaScript run-time environment that lets developers write server-side applications and tools outside of a browser. + +## Usage + +To deploy an application, install dependencies, copy the sources, and configure the application's main script: + +```Dockerfile +FROM registry.suse.com/bci/nodejs:22 + +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm install + +COPY . . + +EXPOSE 3000 + +CMD [ "node", "./server.js" ] +``` + +Build and run the container image: + +```ShellSession +$ podman build -t my-node-app . +$ podman run -it -p 3000:3000 --rm my-node-app +``` + +The example above assumes that there is a `package-lock.lock` file in the application directory. +To generate a `package-lock.lock` file, use the following command: + +```ShellSession +$ podman run --rm -v "$PWD":/app:Z -w /app registry.suse.com/bci/nodejs:22 npm i --package-lock-only +``` + +To run a single script inside a container, use the following command: + +```ShellSession +$ podman run --rm -v "$PWD":/app:Z -w /app registry.suse.com/bci/nodejs:22 node script.js +``` + +## Licensing + +`SPDX-License-Identifier: MIT` + +This documentation and the build recipe are licensed as MIT. +The container itself contains various software components under various open source licenses listed in the associated +Software Bill of Materials (SBOM). + +This image is based on [SLE BCI](https://opensource.suse.com/bci/), a stable and redistributable foundation for software innovation. SLE BCI is enterprise-ready, and it comes with an option for support. + +See the [SLE BCI EULA](https://www.suse.com/licensing/eula/#bci) for further information. diff --git a/nodejs-22-image/_service b/nodejs-22-image/_service new file mode 100644 index 000000000..ed539a4ac --- /dev/null +++ b/nodejs-22-image/_service @@ -0,0 +1,9 @@ + + + + + Dockerfile + %%nodejs_version%% + nodejs22 + + \ No newline at end of file diff --git a/nodejs-22-image/nodejs-22-image.changes b/nodejs-22-image/nodejs-22-image.changes new file mode 100644 index 000000000..b8c1e9ceb --- /dev/null +++ b/nodejs-22-image/nodejs-22-image.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Jan 08 05:05:45 UTC 2025 - SUSE Update Bot + +- First version of the Node.js 22 development BCI