Skip to content

Conversation

@pawelchcki
Copy link

@pawelchcki pawelchcki commented Jan 21, 2026

Summary

Adds Docker Buildx bake configuration for building nginx-datadog modules for SSI (Single Step Instrumentation) packages with RUM (Real User Monitoring) support.

What's new

  • docker-bake.hcl: New build configuration supporting parallel builds across multiple nginx versions (1.24.0 - 1.29.4) and architectures (amd64, arm64)
  • inject-browser-sdk submodule: Integrates the browser SDK injector for RUM functionality
  • packaging/Dockerfile.nginx: Dockerfile for building modules with optional RUM injection
  • Pre-built artifacts support: CMake now supports using pre-built inject-browser-sdk artifacts instead of requiring the full Rust toolchain

Build targets

  • docker buildx bake ssi - Build all nginx modules with RUM for SSI packages
  • docker buildx bake ssi-dev - Build subset (1.28.1, 1.29.4) for quick testing
  • docker buildx bake nginx-all - Build all nginx modules without RUM

Scope reduction

  • Removed OpenResty and ingress-nginx build targets (not needed for SSI)
  • Removed WAF build option

Dependencies

⚠️ Merge first: https://github.com/DataDog/inject-browser-sdk/pull/20

Test plan

  • Run docker buildx bake ssi-dev to verify SSI builds work
  • Verify .so artifacts are generated for both architectures

🤖 Generated with Claude Code

@pawelchcki pawelchcki requested a review from a team as a code owner January 21, 2026 14:25
@pawelchcki pawelchcki requested review from cataphract and removed request for a team January 21, 2026 14:25
pawelchcki and others added 3 commits January 23, 2026 13:26
…image

The musl toolchain can now be built automatically from build_env/ as a
bake dependency. This removes the need to pre-pull or maintain an external
toolchain image. To use a pre-built image instead, set TOOLCHAIN_IMAGE.

Also normalizes architecture naming (arm64 → aarch64) in Makefile for
macOS compatibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…SI builds

- Add inject-browser-sdk as submodule pinned to pawel-buildx-bake branch
- Add docker bake targets for building inject-browser-sdk FFI artifacts
- Add SSI targets (ssi-nginx, ssi-nginx-dev) that output OCI images with RUM enabled
- Modify deps/CMakeLists.txt to support pre-built artifacts from docker bake
- Update Dockerfile.nginx to copy pre-built artifacts instead of cloning repo
- Fix compilation errors in src/rum/injection.cpp (pointer dereference, namespace)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Simplify docker-bake.hcl to only support standard nginx builds.
Removes OPENRESTY_VERSIONS and INGRESS_NGINX_VERSIONS variables,
their corresponding build targets, and group definitions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pawelchcki pawelchcki changed the title example docker bake build Build and package nginx ssi with RUM Jan 23, 2026
pawelchcki and others added 6 commits January 23, 2026 20:12
- Remove WAF_OPTIONS variable and waf_to_dir helper function
- Remove WAF from nginx target matrix, args, and output paths
- Delete unused packaging/Dockerfile.ingress and packaging/Dockerfile.openresty

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a PUSH variable that switches SSI target outputs between
type=docker (default) and type=registry when PUSH=true, enabling
images to be pushed to ghcr.io.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Docker Bake targets and scripts for creating multi-arch OCI packages
for the nginx SSI module using the datadog-packages tooling.

New targets:
- ssi-package-assemble[-dev]: Assembles nginx modules into package structure
- ssi-package-create[-dev]: Creates per-arch OCI packages
- ssi-package-merge[-dev]: Merges into multi-arch OCI index

New scripts:
- bin/generate-ssi-oci-package.sh: Full build (all nginx versions)
- bin/generate-ssi-oci-package-dev.sh: Dev build (1.28.1 + 1.29.4 only)

The packaging targets chain automatically via Docker Bake context
dependencies, so running a single command builds nginx modules,
assembles sources, and creates OCI packages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use dockerfile-inline in bake to dynamically generate COPY statements
from NGINX_VERSIONS variables, eliminating duplication between bake
file and Dockerfiles.

- Add ssi-nginx-modules[-dev] collector targets that combine all
  nginx build outputs into a single image
- Simplify Dockerfile.ssi-sources to single COPY from collector
- Remove Dockerfile.ssi-sources-dev (now unified)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants