This is fork bylexus/apache-php7
GitHub original repository: https://github.com/bylexus/docker-apache-php7
A Docker image based on Debian, serving PHP 7 running as Apache Module. Useful for Web developers in need for a fixed PHP version. In addition, the error_reporting
setting in php.ini is configurable per container via environment variable.
- latest: Debian Jessie 8.0 (LTS), Apache 2.4, PHP 7.0.x with support for setting
error_reporting
$ docker run -d -P genkaok/php7.0-apache2
With all the options:
$ docker run -d -p 8080:80 \
-v /home/user/webroot:/var/www \
-e PHP_ERROR_REPORTING='E_ALL & ~E_STRICT' \
genkaok/php7.0-apache2
-v [local path]:/var/www
maps the container's webroot to a local path-p [local port]:80
maps a local port to the container's HTTP port 80-e PHP_ERROR_REPORTING=[php error_reporting settings]
sets the value oferror_reporting
in the php.ini files.
Apache is configured to log both access and error log to STDOUT. So you can simply use docker logs
to get the log output:
docker logs -f container-id
- Debian Jessie 8, based on debian docker image
- apache2
- curl
- php7.0
- php7.0-cli
- php7.0-apcu
- libapache2-mod-php7.0
- php7.0-gd
- php7.0-json
- php7.0-ldap
- php7.0-mbstring
- php7.0-mysql
- php7.0-pgsql
- php7.0-sqlite3
- php7.0-xml
- php7.0-xsl
- php7.0-zip
- php7.0-soap
- php7.0-opcache
- php7.0-pdo
- php7.0-curl
- php7.0-igbinary
- php7.0-bz2
- php7.0-geoip
- php7.0-imagick
- php7.0-imap
- php7.0-mcrypt
- php7.0-redis
- php7.0-xmlrpc
- Apache: .htaccess-Enabled in webroot (mod_rewrite with AllowOverride all)
- php.ini:
- display_errors = On
- error_reporting = E_ALL (default, overridable per env variable)