Skip to content

build(docker): fetch the external components by running their placeholder scripts - #26205

Merged
TiagoJacobs merged 1 commit into
bigbluebutton:v4.1.x-developfrom
TiagoJacobs:docker-images-from-placeholders
Oct 23, 2026
Merged

TiagoJacobs merged 1 commit into
bigbluebutton:v4.1.x-developfrom
TiagoJacobs:docker-images-from-placeholders

Conversation

@TiagoJacobs

Copy link
Copy Markdown
Member

What does this PR do?

Makes the container images of the external components fetch their source the way the package build does: by running <component>.placeholder.sh from the repository root. The version of each component is then pinned in one place only.

  • docker-bake.hcl: the webrtc-sfu, webrtc-recorder, webhooks and playback targets no longer hardcode a git tag in contexts.src. They (and record-and-playback) get the repository root as a named context placeholders.
  • docker/bbb-*/Dockerfile: the build stage bind-mounts its placeholder script from that context and runs it (BuildKit transfers only that one file, not the repository). The three Alpine build stages install git for the clone; the sfu stage already had it, and no longer needs the git init it used to fake a repository for npm install.
  • record-and-playback/Dockerfile: downloads bbb-presentation-video and python3-perfect-freehand by running bbb-presentation-video.placeholder.sh instead of its own curl with a hardcoded release.
  • .github/workflows/build-all-images.yml: the step that checked that docker-bake.hcl matched the placeholders is gone, since there is nothing left to compare.
  • docker/README.md: updated accordingly.

Closes Issue(s)

None.

Motivation

Every merge of v4.0.x-develop into v4.1.x-develop that bumps an external component fails the image workflow, because 4.0 has no docker-bake.hcl and nobody updates the copy of the tag there. #26198 is the current example: it bumps bbb-webrtc-sfu, bbb-webrtc-recorder and bbb-playback in the placeholders and fails on

Error: docker-bake.hcl does not build bbb-webrtc-sfu at v2.25.0-beta.3 (bbb-webrtc-sfu.placeholder.sh)

With this change a placeholder bump on 4.0 merges into 4.1 with no edit to any 4.1-only file. Nothing changes on 4.0.

Alternatives considered: bake variable blocks filled from the environment by a wrapper script around docker buildx bake (bake's HCL has no way to read a file, so a wrapper is unavoidable there). It keeps one source of truth too, but adds a script, five variables, three workflow edits, and plain docker buildx bake stops working. Running the placeholder is less code and keeps the plain command working.

How to test

  • docker buildx bake --print webhooks shows contexts.placeholders = "." and no tag.
  • docker buildx bake webhooks playback webrtc-recorder record-and-playback webrtc-sfu --load --set '*.platform=linux/amd64' builds all five (done locally for this PR).
  • Bump the tag in a placeholder and rebuild: only the clone layer and what follows it are rebuilt, at the new tag.
  • The images are the same as before: bbb-playback at 5.4.7, bbb-webrtc-recorder at 0.14.0, bbb-webhooks at 3.7.0, bbb-webrtc-sfu at 2.25.0-beta.2, bbb-presentation-video 5.1.0-rc.4.

More

  • record-and-playback/Dockerfile verified sha256 sums of the bbb-presentation-video zip and the perfect-freehand .deb. The placeholder does not, so those pins are gone from the image (the packages never had them). If we want them back without maintaining them in two places, the follow-up is to add a SHA256= line and a sha256sum -c to bbb-presentation-video.placeholder.sh on v4.0.x-develop, which then benefits the packages too.
  • docker buildx bake --print no longer shows which tag an image builds; the placeholder file does.
  • The clone layer is cached on the placeholder's content rather than on the resolved commit of the git context, which is equivalent as long as tags are not moved.
  • Added/updated documentation

…lder scripts

The images of bbb-webrtc-sfu, bbb-webrtc-recorder, bbb-webhooks and bbb-playback built their
source from a git tag hardcoded in docker-bake.hcl, and bbb-record-and-playback downloaded
bbb-presentation-video at a release hardcoded in its Dockerfile. Each version was pinned twice:
there and in the <component>.placeholder.sh the package build runs, with a CI step to keep the
two in sync. Every merge of v4.0.x-develop (no docker-bake.hcl) that bumps a component failed
that step and needed a hand edit of the 4.1-only copy.

The Dockerfiles now bind-mount their placeholder script from the repository root (named context
"placeholders"; BuildKit transfers only that file) and run it, so the image and the package get
the same version from the one file. The CI check has nothing left to compare and is removed.

The sha256 pins of the bbb-presentation-video zip and the python3-perfect-freehand .deb go with
the hardcoded release; the placeholder, like the packages, does not verify them.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 4
  • v3.0.x-release
  • v3.0.x-develop
  • v4.0.x-release
  • v4.0.x-develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: caf87b17-0866-40c5-8419-7914ab751012

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

⏳ Automated tests are running...

@TiagoJacobs
TiagoJacobs merged commit 48f9ca2 into bigbluebutton:v4.1.x-develop Oct 23, 2026
46 of 50 checks passed
@antobinary antobinary added this to the Release 4.1 milestone Oct 23, 2026
@germanocaumo

Copy link
Copy Markdown
Contributor

The record-and-playback image used to verify bbb-presentation-video.zip and python3-perfect-freehand_1.2.0_all.deb against SHA-256 sums. It now runs bbb-presentation-video.placeholder.sh, which downloads both with plain curl -Lf, so the image no longer checks them. Was that intended? If not, the sums could move into the placeholder script, or the Dockerfile could check the files after the script runs.

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.

3 participants