Skip to content

KBuild/docker-php-fpm-5.2

 
 

Repository files navigation

PHP-FPM 5.2 /w Zend Optimizer

Build Status Tag Join the chat at https://gitter.im/devilbox/Lobby

This repository will provide you a fully functional PHP-FPM 5.2.17 Docker image built from official sources nightly. Additional patches have been applied to enable FPM functionality. It provides the base for Devilbox PHP-FPM Docker images.

And Zend Optimizer patched version by KBuild. If you have a issue with PHP-FPM 5.2 Docker image, please go to original repository Devilbox PHP-FPM Docker images.

Docker Hub Upstream Project

Similar Base Images

Build

# Build the Docker image locally
make build

# Rebuild (without cache) the Docker image locally
make rebuild

# Test the Docker image after building
make test

Usage

Add the following FROM line into your Dockerfile:

FROM devilbox/php-fpm-5.2:latest

Example

Create a temporary directory, navigate into it and copy/paste the commands below to get started.

1. Setup hello world webpage

mkdir htdocs
echo "<?php echo 'hello world';" > htdocs/index.php

2. Start PHP container

docker run -d --rm --name devilbox-php-fpm-5-2 \
  -v $(pwd)/htdocs:/var/www/default/htdocs devilbox/php-fpm-5.2

3. Start Nginx container

docker run -d --rm --name devilbox-nginx-stable \
  -v $(pwd)/htdocs:/var/www/default/htdocs \
  -e PHP_FPM_ENABLE=1 \
  -e PHP_FPM_SERVER_ADDR=devilbox-php-fpm-5-2 \
  -p 8080:80 \
  --link devilbox-php-fpm-5-2 \
  devilbox/nginx-stable

4. Open browser

Open up your browser at http://127.0.0.1:8080

Limitations

Web server Status Comments
Apache 2.2 Fails with no input file specified -
Apache 2.4 works Access/Error log via stdout/stderr or file works
Nginx stable works Access/Error log via stdout/stderr or file works
Nginx mainline works Access/Error log via stdout/stderr or file works

Todo

  • Make PHP-FPM 5.2 work with Apache 2.2

With Docker Compose

docker-compose up -d

License

MIT License

Copyright (c) 2018 cytopia

About

PHP-FPM 5.2 Docker Image (base image only)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 75.4%
  • Dockerfile 23.7%
  • Makefile 0.9%