Skip to content

Commit a8474cf

Browse files
docs(deployment): Add comprehensive Deployment documentation
**Deployment Hub (1):** - DEPLOYMENT_README.md: Master deployment guide and hub - Quick start guides for all platforms - Platform comparison matrix - Prerequisites and configuration - Security best practices - Troubleshooting guide - Links to specific deployment guides **Azure App Service Deployment (1):** - AzureAppService/DEPLOYMENT_GUIDE.md: Complete Azure PaaS deployment - Azure resource setup (App Service, Key Vault) - Managed Identity configuration - GitHub Actions CI/CD pipeline - Application Insights integration - Environment variables and secrets - Complete deployment checklist - Troubleshooting and monitoring - Estimated time: 10-15 minutes **Docker Deployment (6):** - Docker/DOCKER_README.md: Docker documentation hub - Docker/DOCKER_DEPLOYMENT.md: Full containerization guide (11 KB) - Building and running containers locally - Publishing to Docker Hub - Cloud deployment (Azure, AWS, GCP, Kubernetes) - Environment variables and configuration - Multi-stage builds - Estimated time: 5-10 minutes (local) - Docker/DOCKER_QUICK_REFERENCE.md: Quick commands and troubleshooting - Docker/DOCKER_SETUP_SUMMARY.md: Overview and checklist - Docker/DOCKER_TROUBLESHOOTING.md: Common issues and solutions - Docker/DOCKER_DNS_CONFIGURATION.md: DNS and networking setup **Deployment Options Covered:** - Docker Compose (Local): Low complexity, 5 min, for development - Azure App Service: Low complexity, 15 min, managed PaaS - Azure Container Apps: Medium complexity, 10 min, serverless containers - Docker + Kubernetes: High complexity, 30+ min, enterprise orchestration - CI/CD (GitHub Actions): Medium complexity, 20 min, automated deployments **Key Topics Covered:** - Azure App Service deployment - Docker containerization - Docker Compose orchestration - Multi-stage Docker builds - Environment-based configuration - Secrets management (Azure Key Vault) - Managed Identity for Azure resources - GitHub Actions CI/CD pipelines - Container health checks - Multi-platform builds (linux/amd64, linux/arm64) - Cloud platform deployment (Azure, AWS, GCP) - Kubernetes deployment - DNS configuration - Troubleshooting and monitoring - Security best practices - Performance optimization This provides complete deployment documentation for all major platforms.
1 parent 46eeb1d commit a8474cf

File tree

8 files changed

+4988
-0
lines changed

8 files changed

+4988
-0
lines changed

docs/Deployment/AzureAppService/DEPLOYMENT_GUIDE.md

Lines changed: 1052 additions & 0 deletions
Large diffs are not rendered by default.

docs/Deployment/DEPLOYMENT_README.md

Lines changed: 840 additions & 0 deletions
Large diffs are not rendered by default.

docs/Deployment/Docker/DOCKER_DEPLOYMENT.md

Lines changed: 1206 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 321 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,321 @@
1+
# Docker Desktop DNS Configuration - Visual Guide
2+
3+
This document provides step-by-step visual instructions for configuring DNS in Docker Desktop to fix NuGet connectivity issues.
4+
5+
---
6+
7+
## Problem You're Experiencing
8+
9+
```
10+
error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json
11+
failed to solve: process "/bin/sh -c dotnet restore..." did not complete successfully: exit code: 1
12+
```
13+
14+
---
15+
16+
## Solution: Configure DNS in Docker Desktop
17+
18+
### Step 1: Open Docker Desktop
19+
20+
1. Look for the **Docker icon** in your system tray (bottom-right of Windows taskbar)
21+
- Should be a **whale icon** ??
22+
- Icon should be **GREEN** (if gray or orange, Docker is not fully running)
23+
24+
2. **Right-click** the Docker icon
25+
3. Select **"Dashboard"** or **"Settings"**
26+
27+
---
28+
29+
### Step 2: Navigate to Docker Engine Settings
30+
31+
```
32+
Docker Desktop Window Layout:
33+
+-------------------------------------------------+
34+
¦ Docker Desktop ?? ¦
35+
¦ ¦
36+
¦ +--------------+ +-------------------------+ ¦
37+
¦ ¦ General ¦ ¦ ¦ ¦
38+
¦ ¦ Resources ¦ ¦ Settings Content ¦ ¦
39+
¦ ¦ Docker Engine¦?-¦ (JSON Configuration) ¦ ¦
40+
¦ ¦ Kubernetes ¦ ¦ ¦ ¦
41+
¦ ¦ Software ¦ ¦ ¦ ¦
42+
¦ ¦ Updates ¦ ¦ ¦ ¦
43+
¦ +--------------+ +-------------------------+ ¦
44+
+-------------------------------------------------+
45+
```
46+
47+
1. Click **Settings** (gear icon ??) in top-right corner
48+
2. In the left sidebar, click **"Docker Engine"**
49+
50+
---
51+
52+
### Step 3: Edit Docker Engine JSON Configuration
53+
54+
You'll see a **JSON editor** with configuration like this:
55+
56+
#### BEFORE (Your current config might look like this):
57+
```json
58+
{
59+
"builder": {
60+
"gc": {
61+
"defaultKeepStorage": "20GB",
62+
"enabled": true
63+
}
64+
},
65+
"experimental": false,
66+
"features": {
67+
"buildkit": true
68+
}
69+
}
70+
```
71+
72+
#### AFTER (Add the DNS configuration):
73+
```json
74+
{
75+
"builder": {
76+
"gc": {
77+
"defaultKeepStorage": "20GB",
78+
"enabled": true
79+
}
80+
},
81+
"dns": ["8.8.8.8", "8.8.4.4"],
82+
"experimental": false,
83+
"features": {
84+
"buildkit": true
85+
}
86+
}
87+
```
88+
89+
**?? IMPORTANT:**
90+
- Add the line: `"dns": ["8.8.8.8", "8.8.4.4"],`
91+
- Make sure to add a **comma** after the previous line (see the comma after `}` in "builder" section)
92+
- JSON syntax matters - one missing comma or bracket will cause errors
93+
94+
---
95+
96+
### Step 4: Apply Changes
97+
98+
```
99+
Bottom of Settings Window:
100+
+------------------------------------------+
101+
¦ ¦
102+
¦ [Cancel] [Apply & Restart] ¦
103+
+------------------------------------------+
104+
```
105+
106+
1. Click **"Apply & Restart"** button at bottom-right
107+
2. Docker Desktop will restart (this takes 30-60 seconds)
108+
3. **WAIT** for the Docker icon in system tray to turn **GREEN**
109+
4. Do NOT proceed until Docker is fully restarted
110+
111+
---
112+
113+
### Step 5: Verify DNS Configuration
114+
115+
Open PowerShell and run:
116+
117+
```powershell
118+
# Test if Docker can resolve DNS
119+
docker run --rm alpine nslookup api.nuget.org
120+
121+
# Expected output:
122+
# Server: 8.8.8.8
123+
# Address: 8.8.8.8#53
124+
#
125+
# Name: api.nuget.org
126+
# Address: <some IP address>
127+
```
128+
129+
If you see the output above, DNS is configured correctly! ?
130+
131+
---
132+
133+
### Step 6: Rebuild Your Application
134+
135+
Now that DNS is configured, rebuild:
136+
137+
```powershell
138+
# Clear old build cache
139+
docker builder prune -a
140+
# Type 'y' to confirm
141+
142+
# Rebuild from scratch
143+
docker-compose build --no-cache
144+
145+
# Start the application
146+
docker-compose up -d
147+
```
148+
149+
---
150+
151+
## Alternative: Use the Automated Script
152+
153+
Instead of manual steps, run the provided PowerShell script:
154+
155+
```powershell
156+
# Navigate to project directory
157+
cd "C:\DATA\MYSTUFFS\PROFESSIONAL STUFF\TECH CHALLENGE\SecureCleanApiWaf"
158+
159+
# Run the fix script
160+
.\Fix-DockerBuild.ps1
161+
```
162+
163+
The script will:
164+
1. ? Check if Docker is running
165+
2. ? Test network connectivity
166+
3. ? Guide you through DNS configuration
167+
4. ? Clear build cache
168+
5. ? Rebuild the application
169+
170+
---
171+
172+
## What the DNS Configuration Does
173+
174+
**Google Public DNS (8.8.8.8 and 8.8.4.4):**
175+
- Provides **reliable** DNS resolution
176+
- Works from anywhere in the world
177+
- Not blocked by most corporate networks
178+
- Fast and reliable
179+
180+
**Why is this needed?**
181+
- Docker containers by default use Docker's internal DNS
182+
- Sometimes Docker's DNS cannot reach external services like NuGet.org
183+
- By setting explicit DNS servers, containers can reliably resolve domain names
184+
185+
---
186+
187+
## Troubleshooting
188+
189+
### ? "Apply & Restart" button is grayed out
190+
**Cause:** JSON syntax error
191+
**Solution:**
192+
- Check for missing commas
193+
- Check for matching brackets `{}`
194+
- Copy the example JSON exactly as shown above
195+
196+
### ? Docker won't restart after applying
197+
**Cause:** Invalid configuration
198+
**Solution:**
199+
1. Re-open Docker Desktop settings
200+
2. Revert to previous configuration
201+
3. Try again with correct JSON syntax
202+
203+
### ? Still getting NuGet errors after DNS configuration
204+
**Solutions:**
205+
1. Verify Docker fully restarted (green icon)
206+
2. Run `docker info` and check DNS section
207+
3. Try disabling VPN temporarily
208+
4. Check Windows Firewall settings
209+
5. Restart your computer
210+
211+
### ? Cannot find "Docker Engine" in settings
212+
**Cause:** Using old version of Docker Desktop
213+
**Solution:**
214+
- Update Docker Desktop to latest version
215+
- Download from: https://www.docker.com/products/docker-desktop
216+
217+
---
218+
219+
## Additional DNS Servers (Alternatives)
220+
221+
If Google DNS (8.8.8.8) doesn't work, try these alternatives:
222+
223+
### Cloudflare DNS (Very fast):
224+
```json
225+
"dns": ["1.1.1.1", "1.0.0.1"]
226+
```
227+
228+
### OpenDNS:
229+
```json
230+
"dns": ["208.67.222.222", "208.67.220.220"]
231+
```
232+
233+
### Multiple DNS servers (recommended):
234+
```json
235+
"dns": ["8.8.8.8", "8.8.4.4", "1.1.1.1", "1.0.0.1"]
236+
```
237+
238+
---
239+
240+
## Quick Reference Card
241+
242+
### Where to Configure DNS:
243+
```
244+
Docker Desktop ? Settings ? Docker Engine ? JSON Editor
245+
```
246+
247+
### What to Add:
248+
```json
249+
"dns": ["8.8.8.8", "8.8.4.4"],
250+
```
251+
252+
### What to Click:
253+
```
254+
"Apply & Restart" button
255+
```
256+
257+
### How Long to Wait:
258+
```
259+
30-60 seconds for Docker to restart
260+
```
261+
262+
### What to Run Next:
263+
```powershell
264+
docker builder prune -a
265+
docker-compose build --no-cache
266+
docker-compose up -d
267+
```
268+
269+
---
270+
271+
## Success Indicators
272+
273+
? Docker icon in system tray is **GREEN**
274+
? Command `docker version` shows both Client and Server
275+
? Command `docker run --rm alpine nslookup api.nuget.org` succeeds
276+
? Build completes without NuGet errors
277+
? Application starts at http://localhost:8080
278+
279+
---
280+
281+
## Related Documentation
282+
283+
- **Quick Fix Guide**: `DOCKER_QUICKFIX.md`
284+
- **Full Troubleshooting**: `docs/Deployment/Docker/DOCKER_TROUBLESHOOTING.md`
285+
- **Automated Script**: `Fix-DockerBuild.ps1`
286+
- **Docker Compose**: `docker-compose.yml`
287+
- **Dockerfile**: `Dockerfile`
288+
289+
---
290+
291+
292+
**Last Updated**: 2025
293+
**For**: SecureCleanApiWaf - .NET 8 Blazor Application
294+
295+
---
296+
297+
## ?? Support
298+
299+
**Need Help?**
300+
301+
- ?? **Documentation:** Start with the deployment guides above
302+
- ?? **Issues:** [GitHub Issues](https://github.com/dariemcarlosdev/SecureCleanApiWaf/issues)
303+
- ?? **Email:** softevolutionsl@gmail.com
304+
- ?? **GitHub:** [@dariemcarlosdev](https://github.com/dariemcarlosdev)
305+
306+
**Before asking for help:**
307+
1. Check the troubleshooting sections REF: above
308+
2. Review the deployment guides for common pitfalls. REF: above
309+
3. Search existing GitHub issues
310+
4. Include error messages and logs
311+
312+
---
313+
314+
**Remember**: 90% of Docker NuGet issues are resolved by configuring DNS! ??
315+
316+
---
317+
318+
**Last Updated:** November 2025
319+
**Maintainer:** Dariemcarlos
320+
**GitHub:** [SecureCleanApiWaf](https://github.com/dariemcarlosdev/SecureCleanApiWaf)
321+

0 commit comments

Comments
 (0)