From 20ef9c9a480b3cc2bd07927b470d5bb5ee46e11c Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Fri, 6 Feb 2026 14:00:03 +0000 Subject: [PATCH] feat(ci): replace npmci with szci across CI and images; add szci preinstalled images and make tini the PID 1 init in Docker images --- .gitea/workflows/docker_nottags.yaml | 34 +++++++++---------- .gitea/workflows/docker_tags.yaml | 34 +++++++++---------- Dockerfile | 4 ++- Dockerfile_alpine-bun | 5 +-- Dockerfile_alpine-deno | 3 +- Dockerfile_alpine-node | 5 +-- ...ile_alpine-npmci => Dockerfile_alpine-szci | 2 +- ...erfile_fossglobal_preinstalled_##version## | 2 +- Dockerfile_stableinit | 6 ---- Dockerfile_npmci => Dockerfile_szci | 2 +- changelog.md | 8 +++++ npmextra.json | 4 +-- package.json | 2 +- readme.hints.md | 2 +- readme.md | 7 ++-- test/test_npmci.sh | 13 ------- test/test_szci.sh | 13 +++++++ 17 files changed, 77 insertions(+), 69 deletions(-) rename Dockerfile_alpine-npmci => Dockerfile_alpine-szci (89%) delete mode 100644 Dockerfile_stableinit rename Dockerfile_npmci => Dockerfile_szci (72%) delete mode 100644 test/test_npmci.sh create mode 100644 test/test_szci.sh diff --git a/.gitea/workflows/docker_nottags.yaml b/.gitea/workflows/docker_nottags.yaml index 2a99306..548725d 100644 --- a/.gitea/workflows/docker_nottags.yaml +++ b/.gitea/workflows/docker_nottags.yaml @@ -6,7 +6,7 @@ on: - '**' env: - IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci + IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:szci NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}} NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}} @@ -24,22 +24,22 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install pnpm and npmci + - name: Install pnpm and szci run: | pnpm install -g pnpm - pnpm install -g @ship.zone/npmci - npmci npm prepare + pnpm install -g @ship.zone/szci + szci npm prepare - name: Audit production dependencies run: | - npmci command npm config set registry https://registry.npmjs.org - npmci command pnpm audit --audit-level=high --prod + szci command npm config set registry https://registry.npmjs.org + szci command pnpm audit --audit-level=high --prod continue-on-error: true - name: Audit development dependencies run: | - npmci command npm config set registry https://registry.npmjs.org - npmci command pnpm audit --audit-level=high --dev + szci command npm config set registry https://registry.npmjs.org + szci command pnpm audit --audit-level=high --dev continue-on-error: true test: @@ -54,18 +54,18 @@ jobs: - name: Prepare run: | pnpm install -g pnpm - pnpm install -g @ship.zone/npmci - npmci npm prepare + pnpm install -g @ship.zone/szci + szci npm prepare - name: Test stable run: | - npmci node install stable - npmci npm install - npmci npm test + szci node install stable + szci npm install + szci npm test - name: Test build run: | - npmci npm prepare - npmci node install stable - npmci npm install - npmci command npm run build + szci npm prepare + szci node install stable + szci npm install + szci command npm run build diff --git a/.gitea/workflows/docker_tags.yaml b/.gitea/workflows/docker_tags.yaml index faf345f..4fa7724 100644 --- a/.gitea/workflows/docker_tags.yaml +++ b/.gitea/workflows/docker_tags.yaml @@ -6,7 +6,7 @@ on: - '*' env: - IMAGE: code.foss.global/host.today/ht-docker-node:npmci + IMAGE: code.foss.global/host.today/ht-docker-node:szci NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git # NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}} # NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}} @@ -27,19 +27,19 @@ jobs: - name: Prepare run: | pnpm install -g pnpm - pnpm install -g @ship.zone/npmci - npmci npm prepare + pnpm install -g @ship.zone/szci + szci npm prepare - name: Audit production dependencies run: | - npmci command npm config set registry https://registry.npmjs.org - npmci command pnpm audit --audit-level=high --prod + szci command npm config set registry https://registry.npmjs.org + szci command pnpm audit --audit-level=high --prod continue-on-error: true - name: Audit development dependencies run: | - npmci command npm config set registry https://registry.npmjs.org - npmci command pnpm audit --audit-level=high --dev + szci command npm config set registry https://registry.npmjs.org + szci command pnpm audit --audit-level=high --dev continue-on-error: true test: @@ -54,27 +54,27 @@ jobs: - name: Prepare run: | pnpm install -g pnpm - pnpm install -g @ship.zone/npmci - npmci npm prepare + pnpm install -g @ship.zone/szci + szci npm prepare - name: Test stable run: | - npmci node install stable - npmci npm install - npmci npm test + szci node install stable + szci npm install + szci npm test - name: Test build run: | - npmci node install stable - npmci npm install - npmci command npm run build + szci node install stable + szci npm install + szci command npm run build release: needs: test if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest container: - image: code.foss.global/host.today/ht-docker-dbase:npmci + image: code.foss.global/host.today/ht-docker-dbase:szci steps: - uses: actions/checkout@v3 @@ -110,4 +110,4 @@ jobs: - uses: actions/checkout@v3 - name: Trigger - run: npmci trigger + run: szci trigger diff --git a/Dockerfile b/Dockerfile index ded86c4..31dd83f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,6 +72,8 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # network iputils-ping \ dnsutils \ + # init + tini \ # chromium (multi-arch compatible - works on both amd64 and arm64) && apt-get install -y -q --no-install-recommends chromium-browser \ @@ -135,5 +137,5 @@ ENV DENO_INSTALL="/root/.deno" ENV PATH="$DENO_INSTALL/bin:$PATH" # Set entrypoint to make nvm available in all runtime contexts -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"] CMD ["bash"] diff --git a/Dockerfile_alpine-bun b/Dockerfile_alpine-bun index 8f000c2..1cc0bc1 100644 --- a/Dockerfile_alpine-bun +++ b/Dockerfile_alpine-bun @@ -16,7 +16,8 @@ RUN apk add --no-cache \ git \ ca-certificates \ unzip \ - libstdc++ + libstdc++ \ + tini # Install NVM (latest version for better Alpine/musl support) RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash @@ -54,5 +55,5 @@ ENV PATH="$BUN_INSTALL/bin:$NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH" ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules # Set entrypoint to make nvm available in all runtime contexts -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"] CMD ["bash"] diff --git a/Dockerfile_alpine-deno b/Dockerfile_alpine-deno index d818a14..f3309ed 100644 --- a/Dockerfile_alpine-deno +++ b/Dockerfile_alpine-deno @@ -17,6 +17,7 @@ RUN apk add --no-cache \ ca-certificates \ unzip \ libstdc++ \ + tini \ deno # Install NVM (latest version for better Alpine/musl support) @@ -54,5 +55,5 @@ ENV PATH="$NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH" ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules # Set entrypoint to make nvm available in all runtime contexts -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"] CMD ["bash"] diff --git a/Dockerfile_alpine-node b/Dockerfile_alpine-node index 87d8758..fa88088 100644 --- a/Dockerfile_alpine-node +++ b/Dockerfile_alpine-node @@ -22,7 +22,8 @@ RUN apk add --no-cache \ unzip \ iputils \ bind-tools \ - libstdc++ + libstdc++ \ + tini # Install NVM (latest version for better Alpine/musl support) RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash @@ -69,5 +70,5 @@ ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH # Set entrypoint to make nvm available in all runtime contexts -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"] CMD ["bash"] diff --git a/Dockerfile_alpine-npmci b/Dockerfile_alpine-szci similarity index 89% rename from Dockerfile_alpine-npmci rename to Dockerfile_alpine-szci index 71a4fde..fa8e5bd 100644 --- a/Dockerfile_alpine-npmci +++ b/Dockerfile_alpine-szci @@ -7,4 +7,4 @@ RUN pip3 install --no-cache --upgrade pip setuptools RUN apk add --update alpine-sdk && \ apk add libffi-dev openssl-dev && \ apk add python3-dev && \ - pnpm install -g @ship.zone/npmci node-gyp \ No newline at end of file + pnpm install -g @ship.zone/szci node-gyp \ No newline at end of file diff --git a/Dockerfile_fossglobal_preinstalled_##version## b/Dockerfile_fossglobal_preinstalled_##version## index 608ebf6..37d16da 100644 --- a/Dockerfile_fossglobal_preinstalled_##version## +++ b/Dockerfile_fossglobal_preinstalled_##version## @@ -1,4 +1,4 @@ -FROM host.today/ht-docker-node:npmci +FROM host.today/ht-docker-node:szci RUN npm install -g \ @git.zone/tsrun \ @git.zone/tstest \ diff --git a/Dockerfile_stableinit b/Dockerfile_stableinit deleted file mode 100644 index 815e527..0000000 --- a/Dockerfile_stableinit +++ /dev/null @@ -1,6 +0,0 @@ -FROM host.today/ht-docker-node:latest -# Add Tini -ENV TINI_VERSION v0.19.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--"] diff --git a/Dockerfile_npmci b/Dockerfile_szci similarity index 72% rename from Dockerfile_npmci rename to Dockerfile_szci index 7dda69b..8ff38dd 100644 --- a/Dockerfile_npmci +++ b/Dockerfile_szci @@ -1,4 +1,4 @@ FROM host.today/ht-docker-node:latest LABEL author="Task Venture Capital GmbH " -RUN pnpm install -g @ship.zone/npmci +RUN pnpm install -g @ship.zone/szci diff --git a/changelog.md b/changelog.md index 5bfe750..800785f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## 2026-02-06 - 5.4.0 - feat(ci) +replace npmci with szci across CI and images; add szci preinstalled images and make tini the PID 1 init in Docker images + +- Replace @ship.zone/npmci with @ship.zone/szci in Gitea CI workflows (.gitea/workflows/docker_nottags.yaml, docker_tags.yaml) and update commands to use szci +- Add szci-specific Dockerfiles (Dockerfile_szci, Dockerfile_alpine-szci) and tests (test/test_szci.sh); remove npmci-specific files +- Install and use tini as PID 1 in multiple Dockerfiles and switch ENTRYPOINT to run tini for proper signal forwarding and zombie reaping +- Update metadata/manifest files (package.json, npmextra.json, readme.*, Dockerfile base tags) to reference szci and document the inclusion of tini + ## 2026-02-06 - 5.3.0 - feat(docker) add Chromium support for Puppeteer/Playwright and npm build/release scripts diff --git a/npmextra.json b/npmextra.json index 6525d1f..74b0eb2 100644 --- a/npmextra.json +++ b/npmextra.json @@ -16,13 +16,13 @@ "CI", "git", "ssh", - "npmci", + "szci", "node version management", "typescript" ] } }, - "npmci": { + "szci": { "dockerRegistries": [ "docker.io", "registry.gitlab.com" diff --git a/package.json b/package.json index 985cd93..37f08be 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "CI", "git", "ssh", - "npmci", + "szci", "node version management", "typescript" ] diff --git a/readme.hints.md b/readme.hints.md index 2759430..d5d3198 100644 --- a/readme.hints.md +++ b/readme.hints.md @@ -68,7 +68,7 @@ RUN node --version # Now shows v18.x.x - ✅ Dockerfile RUN: `nvm install`, `nvm use`, version switching - ✅ Runtime bash -c: All nvm commands work - ✅ CI/CD workflows: Tested in .gitea/workflows context -- ✅ Backward compat: pnpm, npmci, ENV PATH fallback +- ✅ Backward compat: pnpm, szci, ENV PATH fallback - ✅ Multi-stage builds: nvm available in all stages - ✅ Interactive shells: Full nvm access diff --git a/readme.md b/readme.md index d17ff29..21a7ebe 100644 --- a/readme.md +++ b/readme.md @@ -27,8 +27,9 @@ Perfect for complex builds requiring native dependencies and maximum compatibili |-----|-------------|----------| | `:latest` | Node.js LTS with NVM (Ubuntu 24.04) | General purpose, production builds | | `:lts` | Based on latest | Explicit LTS naming | -| `:npmci` | With npmci preinstalled | CI/CD pipelines | -| `:stableinit` | Stable initialization base | Init scripts | +| `:szci` | With szci preinstalled | CI/CD pipelines | + +> **All images include [tini](https://github.com/krallin/tini) as PID 1 init**, ensuring proper signal forwarding and zombie process reaping out of the box. ### Alpine-Based Images (Lightweight & Multi-Arch) ⚡ @@ -39,7 +40,7 @@ Perfect for complex builds requiring native dependencies and maximum compatibili | `:alpine-node` | Node.js LTS + NVM + pnpm | ~200MB | amd64, arm64 | | `:alpine-deno` | Node.js LTS + NVM + Deno | ~180MB | amd64, arm64 | | `:alpine-bun` | Node.js LTS + NVM + Bun | ~150MB | amd64, arm64 | -| `:alpine-npmci` | Alpine Node + npmci + build tools | ~250MB | amd64, arm64 | +| `:alpine-szci` | Alpine Node + szci + build tools | ~250MB | amd64, arm64 | **✨ Multi-architecture magic:** Docker automatically selects the right image for your platform. Build on Mac, deploy on Linux servers—same Dockerfile, native speed everywhere. diff --git a/test/test_npmci.sh b/test/test_npmci.sh deleted file mode 100644 index 6e6d677..0000000 --- a/test/test_npmci.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e - -# check if npmci is available -npm init -y -npmci -v - -# TODO update npmci to not require package.json -npmci node install stable - -# check if npm picks it up -npmci command pnpm install -g @gitzone/tsrun -npmci command tsrun -v diff --git a/test/test_szci.sh b/test/test_szci.sh new file mode 100644 index 0000000..82f1b5c --- /dev/null +++ b/test/test_szci.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +# check if szci is available +npm init -y +szci -v + +# TODO update szci to not require package.json +szci node install stable + +# check if npm picks it up +szci command pnpm install -g @gitzone/tsrun +szci command tsrun -v