Debian-based Apache + PHP + MySQL PDO image for web apps
876
A Debian-based Docker image with Apache, PHP, and PDO MySQL support for running PHP web applications.
php-xml, php-pdo, php-pdo-mysql, php-mysqldocker run -d \
-p 8085:80 \
--name website-app \
jkibbee/website-app:latest
Then visit: http://localhost:8085
version: '3.8'
services:
php-server:
image: jkibbee/website-app:latest
container_name: website-app
ports:
- "8085:80"
volumes:
- ./html:/var/www/html
restart: unless-stopped
Run with:
docker compose up -d
Mount your PHP files into the container's /var/www/html:
docker run -d \
-p 8085:80 \
-v /path/to/your/html:/var/www/html \
--name website-app \
jkibbee/website-app:latest
Change the host port in docker-compose or docker run:
docker run -p 8085:80 jkibbee/website-app:latest
Mount your application files to /var/www/html:
volumes:
- ./your-app:/var/www/html
To suppress the Apache Could not reliably determine the server's FQDN warning, add to your Apache .htaccess or container config:
ServerName localhost
The image includes:
PDO for database abstractionmysqli for MySQL connectionsSimpleXML for XML processingphp-cli for command-line PHP scriptsCheck installed extensions:
docker run jkibbee/website-app:latest php -m
docker logs website-app/var/www/html is not empty or has valid PHPdocker exec website-app tail -f /var/log/apache2/error.logdocker exec website-app php -msudo chown -R 33:33 ./htmldocker pull jkibbee/website-app:latestjkibbee/website-app:latest (with username)If you want to customize the image:
git clone <your-repo>
cd website-app
docker build -t my-website-app:latest .
Specify your license here (e.g., MIT, Apache 2.0)
Found an issue? Have questions?
Maintained by: jkibbee
Last Updated: April 2026
Docker Hub: jkibbee/website-app
Content type
Image
Digest
sha256:f4d86332b…
Size
170 MB
Last updated
5 months ago
docker pull jkibbee/website-app