A Dockerfile installing Apache 2.4, mod_php with a default settings template. Built on Alpine Linux for a small footprint ~26MB.
Use this as a template for serving PHP applications on Apache.
docker pull alfg/php-apache
docker run -it -p 8080:80 --rm alfg/php-apache
docker build -t php-apache
docker run -it -p 8080:80 --rm php-apache
docker-compose:docker-compose build
docker-compose up
$ curl -I localhost:8080/info.php
HTTP/1.1 200 OK
Date: Mon, 27 Aug 2018 00:18:27 GMT
Server: Apache/2.4.34 (Unix)
X-Powered-By: PHP/7.2.8
Content-Type: text/html; charset=UTF-8
Apache and PHP default configurations are included in the etc directory. You can override the configurations and these will be copied over into the container.
Also see etc/apache2/sites/ for adding or editing virtual hosts.
Content type
Image
Digest
Size
10.5 MB
Last updated
about 7 years ago
docker pull alfg/php-apache