Compare commits

..

1 Commits

Author SHA1 Message Date
5743898ba7 v5.3.0
Some checks failed
Docker (tags) / security (push) Successful in 22s
Docker (tags) / test (push) Failing after 31s
Docker (tags) / release (push) Has been skipped
Docker (tags) / metadata (push) Has been skipped
2026-02-06 09:31:43 +00:00
17 changed files with 73 additions and 95 deletions

View File

@@ -6,7 +6,7 @@ on:
- '**' - '**'
env: env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:szci IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git 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_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}} NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
@@ -24,22 +24,22 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install pnpm and szci - name: Install pnpm and npmci
run: | run: |
pnpm install -g pnpm pnpm install -g pnpm
pnpm install -g @ship.zone/szci pnpm install -g @ship.zone/npmci
szci npm prepare npmci npm prepare
- name: Audit production dependencies - name: Audit production dependencies
run: | run: |
szci command npm config set registry https://registry.npmjs.org npmci command npm config set registry https://registry.npmjs.org
szci command pnpm audit --audit-level=high --prod npmci command pnpm audit --audit-level=high --prod
continue-on-error: true continue-on-error: true
- name: Audit development dependencies - name: Audit development dependencies
run: | run: |
szci command npm config set registry https://registry.npmjs.org npmci command npm config set registry https://registry.npmjs.org
szci command pnpm audit --audit-level=high --dev npmci command pnpm audit --audit-level=high --dev
continue-on-error: true continue-on-error: true
test: test:
@@ -54,18 +54,18 @@ jobs:
- name: Prepare - name: Prepare
run: | run: |
pnpm install -g pnpm pnpm install -g pnpm
pnpm install -g @ship.zone/szci pnpm install -g @ship.zone/npmci
szci npm prepare npmci npm prepare
- name: Test stable - name: Test stable
run: | run: |
szci node install stable npmci node install stable
szci npm install npmci npm install
szci npm test npmci npm test
- name: Test build - name: Test build
run: | run: |
szci npm prepare npmci npm prepare
szci node install stable npmci node install stable
szci npm install npmci npm install
szci command npm run build npmci command npm run build

View File

@@ -6,7 +6,7 @@ on:
- '*' - '*'
env: env:
IMAGE: code.foss.global/host.today/ht-docker-node:szci IMAGE: code.foss.global/host.today/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git 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_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
# NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}} # NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
@@ -27,19 +27,19 @@ jobs:
- name: Prepare - name: Prepare
run: | run: |
pnpm install -g pnpm pnpm install -g pnpm
pnpm install -g @ship.zone/szci pnpm install -g @ship.zone/npmci
szci npm prepare npmci npm prepare
- name: Audit production dependencies - name: Audit production dependencies
run: | run: |
szci command npm config set registry https://registry.npmjs.org npmci command npm config set registry https://registry.npmjs.org
szci command pnpm audit --audit-level=high --prod npmci command pnpm audit --audit-level=high --prod
continue-on-error: true continue-on-error: true
- name: Audit development dependencies - name: Audit development dependencies
run: | run: |
szci command npm config set registry https://registry.npmjs.org npmci command npm config set registry https://registry.npmjs.org
szci command pnpm audit --audit-level=high --dev npmci command pnpm audit --audit-level=high --dev
continue-on-error: true continue-on-error: true
test: test:
@@ -54,27 +54,27 @@ jobs:
- name: Prepare - name: Prepare
run: | run: |
pnpm install -g pnpm pnpm install -g pnpm
pnpm install -g @ship.zone/szci pnpm install -g @ship.zone/npmci
szci npm prepare npmci npm prepare
- name: Test stable - name: Test stable
run: | run: |
szci node install stable npmci node install stable
szci npm install npmci npm install
szci npm test npmci npm test
- name: Test build - name: Test build
run: | run: |
szci node install stable npmci node install stable
szci npm install npmci npm install
szci command npm run build npmci command npm run build
release: release:
needs: test needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: code.foss.global/host.today/ht-docker-dbase:szci image: code.foss.global/host.today/ht-docker-dbase:npmci
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -110,4 +110,4 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Trigger - name: Trigger
run: szci trigger run: npmci trigger

View File

@@ -72,8 +72,6 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
# network # network
iputils-ping \ iputils-ping \
dnsutils \ dnsutils \
# init
tini \
# chromium (multi-arch compatible - works on both amd64 and arm64) # chromium (multi-arch compatible - works on both amd64 and arm64)
&& apt-get install -y -q --no-install-recommends chromium-browser \ && apt-get install -y -q --no-install-recommends chromium-browser \
@@ -137,5 +135,5 @@ ENV DENO_INSTALL="/root/.deno"
ENV PATH="$DENO_INSTALL/bin:$PATH" ENV PATH="$DENO_INSTALL/bin:$PATH"
# Set entrypoint to make nvm available in all runtime contexts # Set entrypoint to make nvm available in all runtime contexts
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["bash"] CMD ["bash"]

View File

@@ -16,8 +16,7 @@ RUN apk add --no-cache \
git \ git \
ca-certificates \ ca-certificates \
unzip \ unzip \
libstdc++ \ libstdc++
tini
# Install NVM (latest version for better Alpine/musl support) # 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 RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
@@ -42,11 +41,7 @@ SHELL ["/usr/local/bin/bash-with-nvm"]
ENV BASH_ENV=/etc/bash.bashrc ENV BASH_ENV=/etc/bash.bashrc
# Install Node.js LTS via NVM and Bun # Install Node.js LTS via NVM and Bun
# TARGETARCH fix: QEMU buildx can report wrong arch via uname -m RUN nvm install $NODE_VERSION_LTS \
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 alias default $NODE_VERSION_LTS \
&& nvm use default \ && nvm use default \
&& curl -fsSL https://bun.sh/install | bash && curl -fsSL https://bun.sh/install | bash
@@ -55,5 +50,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 ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules
# Set entrypoint to make nvm available in all runtime contexts # Set entrypoint to make nvm available in all runtime contexts
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["bash"] CMD ["bash"]

View File

@@ -17,7 +17,6 @@ RUN apk add --no-cache \
ca-certificates \ ca-certificates \
unzip \ unzip \
libstdc++ \ libstdc++ \
tini \
deno deno
# Install NVM (latest version for better Alpine/musl support) # Install NVM (latest version for better Alpine/musl support)
@@ -43,11 +42,7 @@ SHELL ["/usr/local/bin/bash-with-nvm"]
ENV BASH_ENV=/etc/bash.bashrc ENV BASH_ENV=/etc/bash.bashrc
# Install Node.js LTS via NVM (Deno already installed from Alpine repos) # Install Node.js LTS via NVM (Deno already installed from Alpine repos)
# TARGETARCH fix: QEMU buildx can report wrong arch via uname -m RUN nvm install $NODE_VERSION_LTS \
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 alias default $NODE_VERSION_LTS \
&& nvm use default && nvm use default
@@ -55,5 +50,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 ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION_LTS/lib/node_modules
# Set entrypoint to make nvm available in all runtime contexts # Set entrypoint to make nvm available in all runtime contexts
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["bash"] CMD ["bash"]

View File

@@ -22,8 +22,7 @@ RUN apk add --no-cache \
unzip \ unzip \
iputils \ iputils \
bind-tools \ bind-tools \
libstdc++ \ libstdc++
tini
# Install NVM (latest version for better Alpine/musl support) # 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 RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
@@ -53,13 +52,7 @@ ENV PATH="$PNPM_HOME:$PATH"
# Install Node.js LTS via NVM and pnpm # Install Node.js LTS via NVM and pnpm
# Use musl-specific builds from unofficial-builds for Alpine compatibility # Use musl-specific builds from unofficial-builds for Alpine compatibility
# TARGETARCH fix: QEMU buildx can report wrong arch via uname -m, causing NVM RUN nvm install $NODE_VERSION_LTS \
# 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 alias default $NODE_VERSION_LTS \
&& nvm use default \ && nvm use default \
&& npm install -g pnpm \ && npm install -g pnpm \
@@ -70,5 +63,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 ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION_LTS/bin:$PATH
# Set entrypoint to make nvm available in all runtime contexts # Set entrypoint to make nvm available in all runtime contexts
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["bash"] CMD ["bash"]

View File

@@ -7,4 +7,4 @@ RUN pip3 install --no-cache --upgrade pip setuptools
RUN apk add --update alpine-sdk && \ RUN apk add --update alpine-sdk && \
apk add libffi-dev openssl-dev && \ apk add libffi-dev openssl-dev && \
apk add python3-dev && \ apk add python3-dev && \
pnpm install -g @ship.zone/szci node-gyp pnpm install -g @ship.zone/npmci node-gyp

View File

@@ -1,4 +1,4 @@
FROM host.today/ht-docker-node:szci FROM host.today/ht-docker-node:npmci
RUN npm install -g \ RUN npm install -g \
@git.zone/tsrun \ @git.zone/tsrun \
@git.zone/tstest \ @git.zone/tstest \

View File

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

6
Dockerfile_stableinit Normal file
View File

@@ -0,0 +1,6 @@
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,13 +1,5 @@
# Changelog # 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) ## 2026-02-06 - 5.3.0 - feat(docker)
add Chromium support for Puppeteer/Playwright and npm build/release scripts add Chromium support for Puppeteer/Playwright and npm build/release scripts

View File

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

View File

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

View File

@@ -68,7 +68,7 @@ RUN node --version # Now shows v18.x.x
- ✅ Dockerfile RUN: `nvm install`, `nvm use`, version switching - ✅ Dockerfile RUN: `nvm install`, `nvm use`, version switching
- ✅ Runtime bash -c: All nvm commands work - ✅ Runtime bash -c: All nvm commands work
- ✅ CI/CD workflows: Tested in .gitea/workflows context - ✅ CI/CD workflows: Tested in .gitea/workflows context
- ✅ Backward compat: pnpm, szci, ENV PATH fallback - ✅ Backward compat: pnpm, npmci, ENV PATH fallback
- ✅ Multi-stage builds: nvm available in all stages - ✅ Multi-stage builds: nvm available in all stages
- ✅ Interactive shells: Full nvm access - ✅ Interactive shells: Full nvm access

View File

@@ -27,9 +27,8 @@ Perfect for complex builds requiring native dependencies and maximum compatibili
|-----|-------------|----------| |-----|-------------|----------|
| `:latest` | Node.js LTS with NVM (Ubuntu 24.04) | General purpose, production builds | | `:latest` | Node.js LTS with NVM (Ubuntu 24.04) | General purpose, production builds |
| `:lts` | Based on latest | Explicit LTS naming | | `:lts` | Based on latest | Explicit LTS naming |
| `:szci` | With szci preinstalled | CI/CD pipelines | | `:npmci` | With npmci preinstalled | CI/CD pipelines |
| `:stableinit` | Stable initialization base | Init scripts |
> **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) ⚡ ### Alpine-Based Images (Lightweight & Multi-Arch) ⚡
@@ -40,7 +39,7 @@ Perfect for complex builds requiring native dependencies and maximum compatibili
| `:alpine-node` | Node.js LTS + NVM + pnpm | ~200MB | amd64, arm64 | | `:alpine-node` | Node.js LTS + NVM + pnpm | ~200MB | amd64, arm64 |
| `:alpine-deno` | Node.js LTS + NVM + Deno | ~180MB | amd64, arm64 | | `:alpine-deno` | Node.js LTS + NVM + Deno | ~180MB | amd64, arm64 |
| `:alpine-bun` | Node.js LTS + NVM + Bun | ~150MB | amd64, arm64 | | `:alpine-bun` | Node.js LTS + NVM + Bun | ~150MB | amd64, arm64 |
| `:alpine-szci` | Alpine Node + szci + build tools | ~250MB | amd64, arm64 | | `:alpine-npmci` | Alpine Node + npmci + 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. **✨ Multi-architecture magic:** Docker automatically selects the right image for your platform. Build on Mac, deploy on Linux servers—same Dockerfile, native speed everywhere.

13
test/test_npmci.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/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

View File

@@ -1,13 +0,0 @@
#!/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