@@ -40,6 +40,10 @@ Access the application at `http://localhost:8080`
4040
4141## Docker Deployment
4242
43+ NLWebNet supports two container build approaches:
44+ 1 . ** Traditional Dockerfile** (recommended for CI/CD and complex scenarios)
45+ 2 . ** .NET SDK Container Build** (modern, simplified approach for development)
46+
4347### Building the Container
4448
4549Use the provided build script for easy Docker image creation:
@@ -58,8 +62,8 @@ Use the provided build script for easy Docker image creation:
5862### Manual Docker Build
5963
6064``` bash
61- # Build the image
62- docker build -t nlwebnet-demo:latest .
65+ # Build the image (traditional Dockerfile approach)
66+ docker build -f deployment/docker/Dockerfile - t nlwebnet-demo:latest .
6367
6468# Run the container
6569docker run -p 8080:8080 \
@@ -69,6 +73,39 @@ docker run -p 8080:8080 \
6973 nlwebnet-demo:latest
7074```
7175
76+ ### .NET SDK Container Build (Modern Approach)
77+
78+ .NET 9 SDK includes built-in container support that eliminates the need for a traditional Dockerfile:
79+
80+ ``` bash
81+ # Navigate to the demo project
82+ cd samples/Demo
83+
84+ # Build and publish as container
85+ dotnet publish -c Release -p:PublishProfile=DefaultContainer
86+
87+ # The container image will be available as 'nlwebnet-demo:latest'
88+ # Run the container
89+ docker run -p 8080:8080 nlwebnet-demo:latest
90+ ```
91+
92+ ** Benefits of .NET SDK Container Build:**
93+ - No Dockerfile required
94+ - Optimized .NET base images
95+ - Automatic security updates
96+ - Simplified build process
97+ - Better layer caching
98+
99+ ** Configuration:**
100+ Container settings can be customized in the project file:
101+ ``` xml
102+ <PropertyGroup >
103+ <ContainerImageName >nlwebnet-demo</ContainerImageName >
104+ <ContainerImageTag >latest</ContainerImageTag >
105+ <ContainerPort >8080</ContainerPort >
106+ </PropertyGroup >
107+ ```
108+
72109### Docker Compose
73110
74111For local development with dependencies:
0 commit comments