fix: upgrade base packages and npm to clear the image scan
build / build (26.04) (pull_request) Successful in 3m34s
build / build (26.10) (pull_request) Successful in 3m35s
build / build (24.04) (pull_request) Successful in 3m38s

apt-get upgrade keeps buildpack-deps from freezing linux-libc-dev at the
version the base image shipped with; five CRITICAL kernel CVEs in that
package alone failed the 24.04 publish. npm 11.21.3 replaces the undici
6.28.0 and brace-expansion 5.0.9 bundled with node 26.13.1, 12 HIGH
findings. The npm tree is copied back into the tool cache because the
in-place upgrade breaks its hardlink.

Release pipeline: each main build now cuts the next patch from the newest
v* tag, publishes v<semver>-ubuntu-<base> next to the moving ubuntu-<base>
tags, and only tags the commit after every base has published, so a failed
scan can no longer leave a half published version. The v0.0.0-dev.<sha>
fallback is gone.

Docs: README no longer pins tool versions that Renovate already tracks, and
the image tags, versioning and commit conventions are written down.
This commit is contained in:
fristy committed 2026-11-20 14:35:30 +03:00
1 parent 24f61b6217
commit a7f9769a82
6 files changed
+131 -51

No files matched your search

+9 -12
View File
@@ -1,11 +1,4 @@
# syntax=docker/dockerfile:1
#
# Ubuntu runner image for our Gitea Actions runners.
#
# Every tool a workflow would otherwise download on each run is baked in:
# node, pnpm, corepack, python, docker CLI + buildx + compose, git, jq, yq, tea,
# go, rust (with the musl target and cargo-zigbuild), gh, trivy, nfpm and zig.
# Actions/setup-node finds node in RUNNER_TOOL_CACHE, so it never hits GitHub.
ARG BASE_IMAGE_TAG=26.10
@@ -16,6 +9,8 @@ ARG BASE_IMAGE_TAG
# renovate: datasource=node-version depName=node
ARG NODE_VERSION=26.13.1
# renovate: datasource=npm depName=npm
ARG NPM_VERSION=11.21.3
# renovate: datasource=npm depName=pnpm
ARG PNPM_VERSION=12.21.0
# renovate: datasource=npm depName=corepack
@@ -66,7 +61,7 @@ RUN case "${TARGETARCH}" in \
&& echo "${trivy_arch}" > /tmp/trivy_arch \
&& echo "${zig_arch}" > /tmp/zig_arch
# Base packages. buildpack-deps already brings compilers, curl, git and the usual libraries.
# buildpack-deps already brings compilers, curl and git; add only the gaps.
RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -98,6 +93,7 @@ RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries \
xz-utils \
zip \
zstd \
&& apt-get upgrade -y \
&& . /etc/os-release \
&& install -m 0755 -d /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \
@@ -114,8 +110,7 @@ RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries \
&& chmod -R 777 /opt/pipx /opt/pipx_bin \
&& rm -rf ~/.cache
# Node goes into the tool cache for setup-node and is hard linked into /usr/local,
# so a shared tool-cache volume cannot hide it.
# npm upgrades break the hardlink, so the tool-cache copy is replaced below.
RUN node_arch="$(cat /tmp/node_arch)" \
&& cd /tmp \
&& base_url="https://nodejs.org/dist/v${NODE_VERSION}" \
@@ -131,8 +126,11 @@ RUN node_arch="$(cat /tmp/node_arch)" \
&& cp -al "${node_dir}/bin" "${node_dir}/include" "${node_dir}/lib" "${node_dir}/share" /usr/local/ \
&& rm -f "${tarball}" SHASUMS256.txt \
&& node --version \
&& npm install -g "pnpm@${PNPM_VERSION}" "corepack@${COREPACK_VERSION}" \
&& npm install -g "npm@${NPM_VERSION}" "pnpm@${PNPM_VERSION}" "corepack@${COREPACK_VERSION}" \
&& rm -rf "${node_dir}/lib/node_modules/npm" \
&& cp -a /usr/local/lib/node_modules/npm "${node_dir}/lib/node_modules/npm" \
&& rm -rf ~/.npm \
&& npm --version \
&& pnpm --version \
&& corepack --version
@@ -227,7 +225,6 @@ RUN arch="$(cat /tmp/arch)" \
&& cargo --version \
&& cargo zigbuild --help > /dev/null
# Runner plumbing: work dir, ssh known hosts, tool cache permissions.
RUN mkdir -m 0777 -p /github /opt/hostedtoolcache \
&& mkdir -m 0700 -p ~/.ssh \
&& ssh-keyscan -t rsa,ecdsa,ed25519 github.com gitea.com >> /etc/ssh/ssh_known_hosts \