JD.MSBuild.Containers Documentation
Welcome to the JD.MSBuild.Containers documentation site. This library provides enterprise-grade MSBuild integration for Docker containerization, enabling automatic Dockerfile generation and Docker builds directly from your .NET project files.
What is JD.MSBuild.Containers?
JD.MSBuild.Containers is an MSBuild-integrated containerization library that automates Docker workflows for .NET applications. It eliminates manual Dockerfile creation and Docker CLI steps by integrating container operations directly into your MSBuild pipeline.
Key Features
- ✅ Automatic Dockerfile Generation - Create optimized multi-stage Dockerfiles during build
- ✅ Granular Control - Enable/disable features independently (generate, build, run, push)
- ✅ Zero Manual Steps - Everything happens during
dotnet buildordotnet publish - ✅ CI/CD Ready - Full GitHub Actions and Azure DevOps support
- ✅ Incremental Builds - Smart fingerprinting skips unchanged files
- ✅ Pre/Post Scripts - Execute custom scripts at any lifecycle stage
- ✅ Multi-Mode Support - Generate-only, build-only, or full automation
Quick Links
Getting Started
- Introduction - Learn about the library and its architecture
- Getting Started - Install and configure your first project
- Core Concepts - Understand how JD.MSBuild.Containers works
Guides & Tutorials
- Basic Tutorial - Step-by-step guide for beginners
- Advanced Tutorial - Complex scenarios and customization
- Workflows - Local development and CI/CD workflows
- Best Practices - Recommended patterns and approaches
Samples
- Sample Overview - Browse all available samples
- Web API Sample - ASP.NET Core Minimal API
- Web App Sample - Razor Pages application
- Worker Sample - Background worker service
- Console App Sample - Command-line application
Reference
- API Reference - Complete API documentation
- MSBuild Properties - See API Reference
- MSBuild Tasks - See API Reference
Quick Start Example
Add the package to your project:
dotnet add package JD.MSBuild.Containers
Enable Docker in your .csproj:
<PropertyGroup>
<DockerEnabled>true</DockerEnabled>
<DockerImageName>myapp</DockerImageName>
<DockerImageTag>latest</DockerImageTag>
</PropertyGroup>
Build your project:
dotnet build
A Dockerfile will be automatically generated. To build the Docker image:
dotnet publish
Support & Contributing
- GitHub Repository: JerrettDavis/JD.MSBuild.Containers
- Issues: Report bugs or request features
- Contributing: See CONTRIBUTING.md
License
This project is licensed under the MIT License. See the LICENSE file for details.