@@ -57,6 +57,11 @@ A modern, secure web interface for DNS lookups using the `dig` command. Perfect
5757
5858## 📋 Requirements
5959
60+ ### For Docker Installation (Recommended)
61+ - ** Docker** 20.10 or higher
62+ - ** Docker Compose** v2 or higher
63+
64+ ### For Manual Installation
6065- ** PHP 8.3** or higher with the following extensions:
6166 - ` json ` (for AJAX API)
6267 - ` filter ` (for input validation)
@@ -66,7 +71,43 @@ A modern, secure web interface for DNS lookups using the `dig` command. Perfect
6671
6772## 🚀 Installation
6873
69- ### Using DDEV (Recommended for Development)
74+ ### Using Docker Compose (Recommended)
75+
76+ 1 . ** Clone the repository** :
77+ ``` bash
78+ git clone https://github.com/yourusername/opensource-digwebinterface.git
79+ cd opensource-digwebinterface
80+ ```
81+
82+ 2 . ** Start the containers** :
83+ ``` bash
84+ docker compose up -d
85+ ```
86+
87+ 3 . ** Access the interface** :
88+ ```
89+ http://localhost:8080
90+ ```
91+
92+ 4 . ** View logs** (optional):
93+ ``` bash
94+ docker compose logs -f
95+ ```
96+
97+ 5 . ** Stop the containers** :
98+ ``` bash
99+ docker compose down
100+ ```
101+
102+ #### Docker Features
103+ - ** PHP 8.3** with FPM for optimal performance
104+ - ** Nginx** web server with optimized configuration
105+ - ** Alpine Linux** base for minimal image size
106+ - ** dig command** pre-installed and configured
107+ - ** Volume mounts** for easy development
108+ - ** Automatic permissions** handling for cache directory
109+
110+ ### Using DDEV (Alternative for Development)
70111
711121 . ** Clone the repository** :
72113 ``` bash
@@ -285,6 +326,71 @@ Add new DNS record types in `config/config.php`:
285326],
286327```
287328
329+ ## 🐳 Docker Troubleshooting
330+
331+ ### Common Issues
332+
333+ 1 . ** Port 8080 already in use** :
334+ ``` bash
335+ # Change the port in docker-compose.yml
336+ ports:
337+ - " 8081:80" # Use port 8081 instead
338+ ```
339+
340+ 2 . ** Permission denied errors** :
341+ ``` bash
342+ # Rebuild with proper permissions
343+ docker compose down
344+ docker compose build --no-cache
345+ docker compose up -d
346+ ```
347+
348+ 3 . ** dig command not working** :
349+ ``` bash
350+ # Test dig inside container
351+ docker compose exec php dig google.com
352+
353+ # Check dig path
354+ docker compose exec php which dig
355+ ```
356+
357+ 4 . ** Changes not reflecting** :
358+ ``` bash
359+ # Restart services
360+ docker compose restart
361+
362+ # Or rebuild if needed
363+ docker compose down
364+ docker compose up -d --build
365+ ```
366+
367+ ### Docker Commands Reference
368+
369+ ``` bash
370+ # Start services
371+ docker compose up -d
372+
373+ # Stop services
374+ docker compose down
375+
376+ # View logs
377+ docker compose logs -f
378+ docker compose logs -f php # PHP logs only
379+ docker compose logs -f nginx # Nginx logs only
380+
381+ # Execute commands in container
382+ docker compose exec php sh # Shell access
383+ docker compose exec php dig example.com # Run dig command
384+ docker compose exec php php -v # Check PHP version
385+
386+ # Rebuild images
387+ docker compose build
388+ docker compose build --no-cache # Force rebuild
389+
390+ # Remove everything (including volumes)
391+ docker compose down -v
392+ ```
393+
288394## 🤝 Contributing
289395
290396Contributions are welcome! Please:
0 commit comments