Sign inSign up

immediate/php

By immediate

•Updated about 4 years ago

While designed for web development, the PHP scripting language also provides general-purpose use.

Image
0

10K+

immediate/php repository overview

⁠PHP

The PHP image for containerised applications.

⁠Introduction

This package is used to build the PHP Docker images primarily used by the Immediate Media micro-services.

For more information, visit the documentation of the Official PHP Docker Image⁠ hosted on Docker Hub.

⁠Usage

Create a Dockerfile in your PHP project

FROM immediate/php:<version>-fpm

WORKDIR /var/www/html

COPY . .

CMD [ "php", "./<script-name>.php" ]

⁠Image variants

The PHP image comes with a number of tags, each designed for a specific use case.

Supported versions:

  • Installing a minor version will always install the latest build of that version
  • The supported versions are maintained in the versions.txt⁠ file
⁠php:<version>-fpm

This variant contains PHP-FPM, and requires some kind of reverse proxy such as NGINX, Apache, or other tool which speaks the FastCGI protocol.

The following additional extensions are installed by default: gmp intl opcache pcntl pdo_mysql zip

⁠php:<version>-fpm-mongodb

This variant is the same as above, but comes with additional mongodb support.

⁠Build instructions

This repository comes with a build.sh script which will build all available variants, and push.sh which will push them.

Variants based on a single PHP version can also be built by running docker-compose directly.

To build variants for a single PHP version, run the following commands:

$ export PHP_VERSION=<version>
$ docker-compose build --pull --parallel

Tag summary

Content type

Image

Digest

Size

42.3 MB

Last updated

almost 7 years ago

docker pull immediate/php