Full-featured PHP 8.2 Apache image with essential extensions for web development.
1.0K
Docker Hub Repository Description:
PHP 8.2 Apache Docker Image with Comprehensive Development Tools
This Docker image provides a complete PHP development environment with Apache, PHP 8.2, and a selection of essential extensions and tools. It includes support for MySQL, ImageMagick, MongoDB, Redis, Xdebug, and more. The image is optimized for developers who need a robust setup for web development, offering Composer for dependency management and NVM with Node.js for JavaScript tooling.
gd, mysqli, pdo_mysql, zip, imagick, mongodb, redis, xdebugrewrite, vhost_aliasTo use this image with Docker, you can pull it from Docker Hub and run it with the following command:
docker pull nicecollab/php8.2-apache
docker run -d -p 80:80 -v /path/to/your/code:/var/www/public nicecollab/php8.2-apache
Replace /path/to/your/code with the path to your PHP project. The -p 80:80 flag maps port 80 on the Docker container to port 80 on your host machine.
For a more complex setup, including database containers and other services, you can use Docker Compose. Below is an example docker-compose.yml file:
version: '3.8'
services:
web:
image: nicecollab/php8.2-apache
ports:
- "80:80"
volumes:
- ./src:/var/www/public
depends_on:
- db
db:
image: mysql:8.0
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: yourpassword
MYSQL_DATABASE: yourdatabase
MYSQL_USER: youruser
MYSQL_PASSWORD: yourpassword
volumes:
db_data:
To start the services, navigate to the directory containing the docker-compose.yml file and run:
docker-compose up -d
This command will spin up both the web and database containers, with your PHP application served from the src directory on your host machine.
This setup provides a full-featured PHP development environment, ready for use in both local development and production deployment.
Content type
Image
Digest
sha256:083ce4746…
Size
408 MB
Last updated
over 2 years ago
docker pull nicecollab/php8.2-apache