vadymsemeniuk/docker-php
Automated build for docker-php image
500K+
This repository provides a Docker image with PHP 7.1 configured for development and production environments. The image includes support for various PHP extensions and tools, ensuring compatibility and flexibility for a wide range of applications.
php:7.1-fpm
.To build the Docker image, run:
docker build -t php-7.1-custom .
Build Arguments
Customize the image during the build process using the following optional arguments:
Argument | Description | Default Value |
---|---|---|
INSTALL_SOAP | Enable SOAP extension | false |
INSTALL_XDEBUG | Enable xDebug extension | false |
INSTALL_PHPREDIS | Enable Redis extension | false |
INSTALL_BCMATH | Enable BCMath extension | false |
INSTALL_MEMCACHED | Enable Memcached extension | false |
INSTALL_AEROSPIKE | Enable Aerospike extension | false |
INSTALL_OPCACHE | Enable Opcache extension | false |
INSTALL_MYSQLI | Enable MySQLi extension | false |
INSTALL_INTL | Enable Intl extension | false |
Example:
docker build --build-arg INSTALL_XDEBUG=true --build-arg INSTALL_SOAP=true -t php-7.1-custom .
To run the container, use:
docker run -d -p 9000:9000 -v $(pwd):/var/www php-7.1-custom
The following configuration files are included and can be customized as needed:
configs/php.ini
configs/php-fpm.pool.conf
configs/xdebug.ini
configs/opcache.ini
configs/aerospike.ini
Mount these files into the container to override the defaults.
INSTALL_AEROSPIKE
: Set to true
to enable Aerospike extension.This Docker image is licensed under the MIT License.
For issues or contributions, feel free to open an issue or submit a pull request.
docker pull vadymsemeniuk/docker-php