You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: fix broken links and replace support with FAQ - Replace support page with FAQ as main navigation item - Remove docs/support/ directory entirely - Fix all broken internal links throughout documentation - Make tutorial a child page of Examples & Tutorials - Ensure clean navigation structure with working links
-`show-ports.sh` - Helper script to display dynamic port mappings
11
+
12
+
## Port Configuration
13
+
14
+
The devcontainer uses **dynamic port allocation** to avoid conflicts when running multiple devcontainers simultaneously. Instead of fixed port mappings like `3000:3000`, the configuration uses dynamic mappings like `3000`, allowing Docker to automatically assign available host ports.
15
+
16
+
### Available Container Ports
17
+
18
+
-`3000` - Node.js/React development server
19
+
-`5000` - Flask development server
20
+
-`8000` - Python web server
21
+
-`8080` - Alternative web server
22
+
-`9000` - Additional service port
23
+
24
+
### Finding Your Assigned Ports
25
+
26
+
After starting the devcontainer, use the helper script to see which host ports were assigned:
27
+
28
+
```bash
29
+
# From inside the devcontainer
30
+
./.devcontainer/show-ports.sh
31
+
32
+
# Or from the host system
33
+
cd /path/to/ai-command-auditor
34
+
./.devcontainer/show-ports.sh
35
+
```
36
+
37
+
Example output:
38
+
39
+
```
40
+
[16:42:15] Found devcontainer: ai-command-auditor_devcontainer-devcontainer-1 (a1b2c3d4e5f6)
41
+
42
+
INFO: Port mappings:
43
+
Container Port 3000/tcp -> Host 0.0.0.0:32768
44
+
Container Port 5000/tcp -> Host 0.0.0.0:32769
45
+
Container Port 8000/tcp -> Host 0.0.0.0:32770
46
+
47
+
INFO: Access your services at:
48
+
React/Node.js Dev Server: http://localhost:32768
49
+
Flask Dev Server: http://localhost:32769
50
+
Python Web Server: http://localhost:32770
51
+
```
52
+
53
+
### Benefits of Dynamic Port Allocation
54
+
55
+
1.**No Port Conflicts** - Multiple devcontainers can run simultaneously
56
+
2.**Automatic Assignment** - Docker handles port allocation automatically
57
+
3.**Easy Discovery** - Use the helper script to find assigned ports
58
+
4.**Flexible Development** - Work on multiple projects without conflicts
59
+
60
+
## Troubleshooting
61
+
62
+
### Port Discovery Issues
63
+
64
+
If the `show-ports.sh` script can't find your container:
65
+
66
+
1. Check if the container is running:
67
+
68
+
```bash
69
+
docker ps | grep ai-command-auditor
70
+
```
71
+
72
+
2. Verify the container name pattern in the script matches your actual container name
73
+
74
+
3. Manual port checking:
75
+
76
+
```bash
77
+
docker port <container-name-or-id>
78
+
```
79
+
80
+
### Container Startup Issues
81
+
82
+
If you encounter port binding errors:
83
+
84
+
1. Stop any conflicting containers:
85
+
86
+
```bash
87
+
docker ps
88
+
docker stop <conflicting-container>
89
+
```
90
+
91
+
2. Rebuild the devcontainer:
92
+
- In VS Code: `Ctrl+Shift+P` → "Dev Containers: Rebuild Container"
0 commit comments