Compare commits

...

3 Commits

Author SHA1 Message Date
6935d292b4 v5.4.0
Some checks failed
Docker (tags) / security (push) Failing after 1s
Docker (tags) / test (push) Has been skipped
Docker (tags) / release (push) Has been skipped
Docker (tags) / metadata (push) Has been skipped
2026-02-06 14:00:03 +00:00
3420824d7b feat(ci): replace npmci with szci across CI and images; add szci preinstalled images and make tini the PID 1 init in Docker images 2026-02-06 14:00:03 +00:00
f3c2510a24 v5.3.0 2026-02-06 10:06:40 +00:00
17 changed files with 95 additions and 73 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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"]

View File

@@ -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
@@ -41,7 +42,11 @@ SHELL ["/usr/local/bin/bash-with-nvm"]
ENV BASH_ENV=/etc/bash.bashrc
# Install Node.js LTS via NVM and Bun
RUN nvm install $NODE_VERSION_LTS \
# TARGETARCH fix: QEMU buildx can report wrong arch via uname -m
ARG TARGETARCH
RUN NVM_MUSL_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "arm64-musl" || echo "x64-musl") \
&& nvm_get_arch() { echo "$NVM_MUSL_ARCH"; } \
&& nvm install $NODE_VERSION_LTS \
&& nvm alias default $NODE_VERSION_LTS \
&& nvm use default \
&& curl -fsSL https://bun.sh/install | bash
@@ -50,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"]

View File

@@ -17,6 +17,7 @@ RUN apk add --no-cache \
ca-certificates \
unzip \
libstdc++ \
tini \
deno
# Install NVM (latest version for better Alpine/musl support)
@@ -42,7 +43,11 @@ SHELL ["/usr/local/bin/bash-with-nvm"]
ENV BASH_ENV=/etc/bash.bashrc
# Install Node.js LTS via NVM (Deno already installed from Alpine repos)
RUN nvm install $NODE_VERSION_LTS \
# TARGETARCH fix: QEMU buildx can report wrong arch via uname -m
ARG TARGETARCH
RUN NVM_MUSL_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "arm64-musl" || echo "x64-musl") \
&& nvm_get_arch() { echo "$NVM_MUSL_ARCH"; } \
&& nvm install $NODE_VERSION_LTS \
&& nvm alias default $NODE_VERSION_LTS \
&& nvm use default
@@ -50,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"]

View File

@@ -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
@@ -52,7 +53,13 @@ ENV PATH="$PNPM_HOME:$PATH"
# Install Node.js LTS via NVM and pnpm
# Use musl-specific builds from unofficial-builds for Alpine compatibility
RUN nvm install $NODE_VERSION_LTS \
# TARGETARCH fix: QEMU buildx can report wrong arch via uname -m, causing NVM
# to download x64 binaries on arm64. We create a temporary uname wrapper to
# ensure the correct architecture binary is downloaded.
ARG TARGETARCH
RUN NVM_MUSL_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "arm64-musl" || echo "x64-musl") \
&& nvm_get_arch() { echo "$NVM_MUSL_ARCH"; } \
&& nvm install $NODE_VERSION_LTS \
&& nvm alias default $NODE_VERSION_LTS \
&& nvm use default \
&& npm install -g pnpm \
@@ -63,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"]

View File

@@ -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
pnpm install -g @ship.zone/szci node-gyp

View File

@@ -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 \

View File

@@ -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", "--"]

View File

@@ -1,4 +1,4 @@
FROM host.today/ht-docker-node:latest
LABEL author="Task Venture Capital GmbH <hello@task.vc>"
RUN pnpm install -g @ship.zone/npmci
RUN pnpm install -g @ship.zone/szci

View File

@@ -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

View File

@@ -16,13 +16,13 @@
"CI",
"git",
"ssh",
"npmci",
"szci",
"node version management",
"typescript"
]
}
},
"npmci": {
"szci": {
"dockerRegistries": [
"docker.io",
"registry.gitlab.com"

View File

@@ -1,6 +1,6 @@
{
"name": "ht-docker-node",
"version": "5.2.0",
"version": "5.4.0",
"description": "A Docker image that integrates Node.js with shipzone.io support.",
"main": "index.js",
"scripts": {
@@ -30,7 +30,7 @@
"CI",
"git",
"ssh",
"npmci",
"szci",
"node version management",
"typescript"
]

View File

@@ -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

View File

@@ -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.

View File

@@ -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

13
test/test_szci.sh Normal file
View File

@@ -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