Sign inSign up

alfg/php-apache

By alfg

Updated about 7 years ago

Docker PHP Apache build on Alpine.

Image
1

622

alfg/php-apache repository overview

Docker PHP Apache

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 Stars Docker Pulls Docker Automated build Build Status

Usage

  • Pull docker image and run:
docker pull alfg/php-apache
docker run -it -p 8080:80 --rm alfg/php-apache
  • or build and run container from source:
docker build -t php-apache
docker run -it -p 8080:80 --rm php-apache
  • or build using 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

Configure

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.

Resources

Tag summary

Content type

Image

Digest

Size

10.5 MB

Last updated

about 7 years ago

docker pull alfg/php-apache