Sign inSign up

jamesbrink/php

By jamesbrink

Updated over 7 years ago

Minimal PHP/Apache Docker image built on top of Alpine Linux.

Image
1

5.9K

jamesbrink/php repository overview

Minimal PHP/Apache Docker image built on top of Alpine Linux.

Build Status Docker Automated build Docker Pulls Docker Stars

Available versions:

All images are based off of the official Alpine Linux 3.7 image.

About

For the most part I use nearly the identical build process as the official
php:7-cli-alpine images. I have including the docker-php-* helper scripts
that are included in the official images as well. The biggest difference is the inclusion of Apache 2.4 and compiling PHP against the packaged version of pcre.

Pull requests or suggestions are always welcome.

Goals

The primary goal of this container is to stay small and light weight, yet still useful for general use/consumption. This should serve as a solid base image and can be easily extended as I have done with my Magento2 image resulting in a very slim yet complete Magento 2 container.

Usage Examples

Run exposing HTTP port 80.
This will serve up index.php at http://localhost that will printing out phpinfo.

docker run -p 80:80 jamesbrink/php

Use as a base image.

FROM jamesbrink/php:7.2
COPY ./MyApp /var/www/localhost/htdocs/
RUN apk add --update my-deps...

Environment Variables

Environment Variables:

  • APACHE_LOG_LEVEL - Default: "warn", adjusts the verbosity of the apache server
    which by default prints to STDOUT. Refer to the apache2 manual for available LogLevels.

Tag summary

Content type

Image

Digest

Size

31.1 MB

Last updated

over 7 years ago

docker pull jamesbrink/php