A Docker image for delegating the build process of docfx.
2.8K
Build beautiful, framework-aware .NET documentation in a consistent, containerized environment.
Codebelt DocFX extends the upstream DocFX tooling with shared documentation templates, native multi-framework API generation, intelligent framework navigation, and deployment-ready static site packaging.
Designed for individual developers, open-source maintainers, and organizations that want a consistent documentation experience across projects without maintaining their own documentation build infrastructure.
No local DocFX, .NET SDK, or PowerShell installation required for containerized builds. Just Docker.
Pull the builder image:
docker pull codebeltnet/docfx:2
Verify the installed DocFX version:
docker run --rm codebeltnet/docfx:2 docfx --version
Generate framework-aware documentation directly from your repository using PowerShell syntax:
docker run --rm `
--mount "type=bind,source=$($PWD.Path),target=/workspace" `
-w /workspace `
codebeltnet/docfx:2 `
pwsh -NoProfile -File /opt/docfx/framework-views/Build-DocfxFrameworkViews.ps1
The generator discovers target frameworks from your projects through MSBuild, reads .docfx/docfx.json, and produces a static documentation site and hosting configuration under .bot/docfx.
Conventional single-framework documentation builds can continue to use the standard DocFX CLI.
The distribution independently versions the upstream DocFX CLI and the Codebelt documentation engine.
| Image tag | Description |
|---|---|
2 | Current distribution within DocFX CLI major version 2 |
2.81 | Current distribution within DocFX CLI minor version 2.81 |
2.81.0 | Distribution using the exact DocFX CLI version |
2-v1.1.1 | DocFX CLI major version with a specific Codebelt engine release |
2.81-v1.1.1 | DocFX CLI minor version with a specific Codebelt engine release |
2.81.0-v1.1.1 | Explicit DocFX CLI and Codebelt engine versions |
The engine-qualified tags above illustrate the versioning convention using Codebelt engine version 1.1.1.
The distribution supports Linux AMD64 and ARM64 and includes .NET 10 and .NET 11 SDK environments.
There is intentionally no latest Docker tag.
Versioned convenience tags receive newer compatible DocFX CLI distributions and may receive breaking Codebelt engine changes. Use engine-qualified tags for explicit version control or pin an image digest for immutable, reproducible builds.
See the available tags.
Document multiple generations of .NET through a single documentation website.
The framework-view generator uses native DocFX metadata generation and rendering for each discovered target framework rather than attempting to merge incompatible API definitions into one synthetic reference model.
Readers can switch between available frameworks using a consistent public URL structure:
/api/Example.html?view=net-11.0
/api/Example.html?view=net-10.0
/api/Example.html?view=netstandard-2.0
Framework-specific API availability, navigation, cross-references, and search results are preserved. When an API is unavailable in the selected framework, navigation resolves to an available framework according to a deterministic precedence policy.
See the framework views documentation for configuration, hosting, and migration guidance.
The image includes the upstream default and modern DocFX templates alongside the Codebelt ms-style compatibility overlay.
Enable the shared template in your docfx.json:
{
"build": {
"template": [
"default",
"modern",
"templates/ms-style"
]
}
}
For dedicated API member pages, configure memberLayout as separatePages in your metadata entries.
The template provides:
The template is inspired by the Microsoft Learn .NET API reference experience while remaining a standalone, customizable DocFX template.
The shared documentation environment is developed for and used across the Codebelt ecosystem.
Explore representative documentation websites:
The framework-view generator can also run natively on Windows and Linux with the required .NET SDKs, DocFX, Git, and PowerShell 7 installed.
The source repository includes tooling for building, validating, and publishing custom builder images independently of Codebelt's release infrastructure.
The builder image is intended for documentation generation. The generated documentation can be packaged separately into a static web-serving image for production deployment.
Developed and maintained as part of the Codebelt ecosystem.
Write it. Document it. Build it. Ship it.
docker pull codebeltnet/docfx:2