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:alpine` image for lightweight performance
## How It Works
1.**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.html` if no content is found
2.**Web Server**: After the check, Apache starts normally and serves content from the web directory
3.**Persistence**: If you mount a volume with existing content, the default page won't be copied
## Usage
### Basic Usage
```bash
# 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)
```bash
# 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