Sign inSign up

grenadecastle/php

By grenadecastle

•Updated over 5 years ago

Fully featured PHP-FPM builds with all extensions you and PHP can handle including imagick.

Image
1

2.7K

grenadecastle/php repository overview

This is a Grenade Castle private PHP build repository. We decided to make it public. It comes with no support and no guarantee, however these images are widely used on tons of our project without any problems. These images are provided as complete and (unless there's a huge bug) will be updated only when there's a new PHP version.

Motivation behind these images: we needed a fully featured PHP for our many project and we didn't want to create a custom PHP build for every client. So we decided to make a big PHP build with all it can handle.

⁠Included PHP versions

8.0.3, 7.4, 7.3, 7.2 and legacy 5.6. There's no 7.1 or 7.0, because these versions are allready at end-of-life today. https://www.php.net/supported-versions.php⁠

⁠What's included?

imap, gd, shmop, pdo, pdo_mysql, mysqli, bz2, dom, gettext, intl, json, mbstring, session, simplexml, soap, sockets, exif, iconv, pspell, xsl, zip, libmemcached, memcached, apcu, timezonedb, libgpgme11, gnupg and fully functional imagick.

⁠How to run these images?

These PHP builds are all PHP FPM, so there's no Apache/Nginx baked in. You need to have a standalone Apache or Nginx server running and configured to connect to these images. Thankfully we also provide our custom Apache builds (with compression, security and brotli) at https://hub.docker.com/r/grenadecastle/apache⁠.

⁠Configuration

All configuration files can be found in our public repository on GitHub in the respective branches, PHP 7 and 5 differ a lot in configuration. https://github.com/JustGetSchwifty/php⁠

⁠Example docker-compose.yml

version: '3.7'

services:
  example-apache:
    image: grenadecastle/apache:latest
    container_name: example-apache
    volumes:
      - ./web/:/var/www/html/:rw
      - ./_config/apache2/apache2.conf:/etc/apache2/apache2.conf:rw
      - ./_config/apache2/custom-conf/:/etc/apache2/custom-conf/:rw
      - ./_config/apache2/ssl/:/etc/apache2/ssl/:rw
      - ./_config/apache2/sites-enabled/:/etc/apache2/sites-enabled/:rw
      - ./_logs/apache/:/var/log/apache2/:rw
    ports:
      - 80:80
      - 443:443
    external_links:
      - "example-php:fpm"

  example-php:
    image: grenadecastle/php:release-7.4
    depends_on:
      - example-apache
    container_name: example-php
    expose:
      - 9000
    volumes:
      - ./web/:/var/www/html/:rw
      - ./_config/php/:/usr/local/etc/php/:rw
      - ./_config/php-fpm/:/usr/local/etc/php-fpm.d/:rw
      - ./_logs/php/:/var/log/php/:rw

The _config directory for PHP can be downloaded here: https://github.com/JustGetSchwifty/php⁠ (choose the right branch for your PHP version), Apache image and Apache _config can be found here: https://hub.docker.com/r/grenadecastle/apache⁠, https://github.com/JustGetSchwifty/apache⁠.

Tag summary

Content type

Image

Digest

Size

340.8 MB

Last updated

over 5 years ago

docker pull grenadecastle/php