All checks were successful
		
		
	
	WHP Default Container / Build-and-Push (push) Successful in 14s
				
			- Modified Dockerfile to set AllowOverride All for htdocs directory - Enabled mod_rewrite module for common .htaccess functionality - Added CLAUDE.md with project documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Web Server Container with Auto-Landing Page
This Docker container provides a web server that automatically checks for content in the web directory and provides a beautiful default landing page if none exists.
Features
- Auto-Detection: Checks if the web directory (
/usr/local/apache2/htdocs) is empty on startup - Default Landing Page: Automatically copies a modern, responsive landing page if no content exists
 - Non-Destructive: Only copies the default page if the directory is truly empty
 - Apache Web Server: Based on the official 
httpd:alpineimage for lightweight performance 
How It Works
- 
Startup Check: When the container starts, it runs a startup script that:
- Checks if the web directory exists (creates it if needed)
 - Determines if the directory is empty (ignoring hidden files)
 - Copies the default 
index.htmlif no content is found 
 - 
Web Server: After the check, Apache starts normally and serves content from the web directory
 - 
Persistence: If you mount a volume with existing content, the default page won't be copied
 
Usage
Basic Usage
# Build the container
docker build -t my-web-server .
# Run the container
docker run -p 80:80 my-web-server
With Volume Mount (for persistent content)
# Mount a local directory to preserve your content
docker run -p 80:80 -v /path/to/your/web/content:/usr/local/apache2/htdocs my-web-server
With Custom Port
# Run on a different port
docker run -p 8080:80 my-web-server
File Structure
.
├── Dockerfile          # Container definition
├── index.html          # Default landing page (beautiful, responsive)
├── scripts/
│   └── startup.sh      # Startup script that handles the logic
└── README.md           # This file
Customization
Modifying the Default Landing Page
Edit the index.html file before building the container. The page includes:
- Modern gradient background
 - Responsive design
 - Feature cards
 - Smooth animations
 - Mobile-friendly layout
 
Modifying the Startup Logic
Edit scripts/startup.sh to change:
- Web directory path
 - File detection logic
 - Additional initialization steps
 
Container Details
- Base Image: 
httpd:alpine(lightweight Apache server) - Web Directory: 
/usr/local/apache2/htdocs - Default Port: 80
 - Entrypoint: 
/startup.sh 
Troubleshooting
Container Won't Start
- Check that 
scripts/startup.shis executable:chmod +x scripts/startup.sh - Verify the Dockerfile syntax: 
docker build -t test . 
Default Page Not Appearing
- Check container logs: 
docker logs <container_name> - Verify the web directory is actually empty
 - Ensure no volume is mounted that contains files
 
Permission Issues
- The container runs as the default Apache user
 - If mounting volumes, ensure proper permissions: 
chmod 755 /path/to/web/content 
Description
				
					Languages
				
				
								
								
									HTML
								
								89.8%
							
						
							
								
								
									Shell
								
								5.4%
							
						
							
								
								
									Dockerfile
								
								4.8%