Skip to content

feat: rebuild the official ruby:X.Y.Z-bookworm image on demand - #29

Merged
dedene merged 1 commit into
mainfrom
feat/official-bookworm-rebuild
Oct 23, 2026
Merged

dedene merged 1 commit into
mainfrom
feat/official-bookworm-rebuild

Conversation

@dedene

@dedene dedene commented Oct 23, 2026

Copy link
Copy Markdown
Member

Ruby 4.0.8 and 4.0.9 shipped fixes for an Onigmo regex overflow (the root cause of GitLab's CVE-2026-110264). The official ruby:*-bookworm images showed up 16 to 22 hours after each release. This repo used to cover that gap, but it had drifted: bullseye-slim base (Debian LTS ended in August), last image 4.0.1, weekly schedule disabled by GitHub for inactivity. Nimbu switched to the official image in January.

This turns it into a break-glass mirror of the official image instead of a separate flavour.

Dockerfile: docker-library's 4.0/bookworm template, with only the Ruby version and SHA256 turned into build args. Same buildpack-deps:bookworm base, YJIT, ZJIT (4.x only), full RELRO, same GEM_HOME/BUNDLE_* env. So zenjoy/ruby:4.0.9-bookworm can replace ruby:4.0.9-bookworm in Nimbu's BASE_IMAGE without touching the Aptfile.

build.yml:

  • Manual dispatch with version + SHA256. The SHA is cross-checked against cache.ruby-lang.org/pub/ruby/index.txt, so a typo or a doctored value fails before anything builds.
  • amd64 and arm64 on the free hosted runners (ubuntu-24.04, ubuntu-24.04-arm) instead of the 2-core larger ARM runner.
  • Smoke test per platform: version matches, YJIT present, openssl/psych/zlib load.
  • Tags X.Y.Z-bookworm and X.Y-bookworm on Docker Hub and GHCR, no latest. Cosign keyless signatures as before.
  • Pull requests build and smoke-test 4.0.9 without pushing.

Also: the weekly matrix is gone (the official images already do Debian refreshes, and a schedule we don't watch is how this went stale), actions are on current majors (supersedes #24–#28), and the old YJIT check (MAJOR >= 3 && MINOR >= 2) that left YJIT off for every 4.x image no longer exists.

Verified locally on arm64: built 4.0.9, RUBY_DESCRIPTION is ruby 4.0.9 (2026-10-23 revision 3e93b23afc) +PRISM, YJIT and ZJIT present, libruby.so has BIND_NOW, env matches the official image. The pattern that hangs Ruby 4.0.5 for over a minute compiles in milliseconds. actionlint is clean.

After merge: run the workflow with 4.0.9 / a8057adb39f51ad6dc3106237504c93dd792bb515837b4fe7817ae21ed7e51f4 (matches the ruby-lang.org post and index.txt), then point zenjoy/nimbu#2169 at it.

Replace the bullseye-slim image (Debian LTS ended 2026-08-31) with the
docker-library bookworm template, version and checksum as build args, so
zenjoy/ruby:X.Y.Z-bookworm is a drop-in for ruby:X.Y.Z-bookworm when a
Ruby security release lands before the official image.

- build.yml: manual dispatch with version + SHA256 (cross-checked against
  cache.ruby-lang.org index.txt), amd64 + arm64 on hosted runners, smoke
  test, X.Y.Z-bookworm and X.Y-bookworm tags on Docker Hub and GHCR,
  cosign signatures; PRs build and smoke-test without pushing
- drop the weekly matrix rebuild
- bump actions to current majors
- fix: YJIT was never enabled for Ruby 4.x (minor >= 2 check)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant