Foundry · Infrastructure · swarm-routing/ns3-containers
ns3-containers
ns-3 pre-built and tested, so a contrib module compiles alone in seconds.
Unlocked: Live: signed images on GHCR
What it does
ns3-containers publishes ghcr.io/swarm-routing/ns3-dev (public, no login): ns-3 configured and built with Ninja at /opt/ns-3. A downstream module is linked into the warm tree by ns3-build-contrib and compiles alone; the smoke gate counts the Ninja steps (8 today, gate 40) to prove the cache was hit.
Automatic pipelines build only the release ns-3 supports (its latest; 3.49 today), read from upstream's tags by tools/ns3_matrix.py, never a hand-typed version. Older releases are built on demand and kept as history. Four profiles: default, debug (CI), sanitized (ASan + LSan + UBSan) and optimized (ns-3's release, for campaigns only, never -march=native).
What is tested is what is tagged: each image is built once, every test stage runs on that build by digest (structure, profile, smoke, integration, unit, Trivy security), and the published tags are a carbon copy of that digest, then signed and attested. A published number pins the immutable :<ver>-<profile>-<sha7> tag.
Diagrams
imagetools create), never a rebuild.default and debug.Package structure
The repository's layout, its licence per directory (LICENSING.md) and what exists today.
| Path | What | Licence | State |
|---|---|---|---|
docker/Dockerfile | BASE_IMAGE x NS3_VERSION x BUILD_PROFILE image | GPL-2.0-only | present |
docker/scripts/build-contrib.sh | /usr/local/bin/ns3-build-contrib: --strict-warnings, --coverage, --quality-modules | MIT OR GPL-2.0-only | present |
tools/ns3_matrix.py | supported vs on-demand releases, base digests and tags (+ test) | MIT OR GPL-2.0-only | present |
test/run.sh | every test stage against one image ref (the candidate digest in CI) | MIT OR GPL-2.0-only | present |
test/{structure,profile,smoke,integration,unit}.sh | the image contract, the profile's promise, incremental build, ns-3 simulates, ns-3's own suites | MIT OR GPL-2.0-only | present |
test/fixtures/ | swarm-hello (C++17..C++23 module), manet-canary, profile-probe | GPL-2.0-only | present |
.github/workflows/publish-images.yml | resolve, build once, test by digest, promote, sign, attest | GPL-2.0-only | present |
Where it sits in the colony
Quests
- Done: Images published from main, signed and public (Phase 1)
- Done: The image smoke builds a C++20 module in 8 Ninja steps on every profile
- Open: Move the aodv arm's check back to latest once ns-3 fixes its AODV livelock (ns3-containers#35)
Sources
Facts as of 2026-11-08, from the repository's AGENTS.md and the org ROADMAP.