Skip to content

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

License

Notifications You must be signed in to change notification settings

jamesbrink/docker-php

Repository files navigation

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

Build Status Docker Automated build Docker Pulls Docker Stars

Available versions:

  • jamesbrink/php:latest (80MB) - PHP 7.2.3 (Dockerfile)
  • jamesbrink/php:7.1(72MB) - PHP 7.1.15 (Dockerfile)
  • jamesbrink/php:7.0 (71MB) - PHP 7.0.28 (Dockerfile)

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published