/docker-php-fpm

Docker Image Packaging for PHP-FPM

Primary LanguageJinjaApache License 2.0Apache-2.0

Docker Image Packaging for PHP-FPM

AlviStack

GitLab pipeline status GitHub tag GitHub license Docker Pulls

PHP is a popular general-purpose scripting language that is especially suited to web development.

Learn more about PHP: https://php.net/

Supported Tags and Respective Packer Template Links

Overview

This Docker container makes it easy to get an instance of PHP up and running.

Based on Official Ubuntu Docker Image with some minor hack:

  • Packaging by Packer Docker builder and Ansible provisioner in single layer
  • Handle ENTRYPOINT with catatonit
  • Change User and Group to www-data
  • Change DocumentRoot to /var/www/html
  • Additional PHP extensions:
    • bcmath
    • bz2
    • calendar
    • exif
    • gd
    • gettext
    • iconv
    • imap
    • intl
    • json
    • ldap
    • mbstring
    • mysql
    • mysqli
    • opcache
    • pcntl
    • pdo_mysql
    • pdo_pgsql
    • pdo_sqlite
    • pgsql
    • shmop
    • simplexml
    • soap
    • sockets
    • sysvmsg
    • sysvsem
    • sysvshm
    • tidy
    • wddx
    • xml
    • xmlrpc
    • xsl
    • zip
  • Additional PECL extensions:
    • apcu
    • apcu_bc
    • geoip
    • imagick
    • memcached
    • redis
    • uuid

Quick Start

For the VOLUME directory that is used to store the repository data (amongst other things) we recommend mounting a host directory as a data volume, or via a named volume if using a docker version >= 1.9.

Start PHP:

# Pull latest image
docker pull alvistack/php-8.3-fpm

# Run with built-in web server
docker run \
    -itd \
    --rm \
    --name php \
    --publish 8080:8080 \
    alvistack/php-8.3-fpm \
    php -S 0.0.0.0:8080 -t /var/www/html

Success. PHP is now available on http://localhost:8080/phpinfo.php

Versioning

YYYYMMDD.Y.Z

Release tags could be find from GitHub Release of this repository. Thus using these tags will ensure you are running the most up to date stable version of this image.

YYYYMMDD.0.0

Version tags ended with .0.0 are rolling release rebuild by GitLab pipeline in weekly basis. Thus using these tags will ensure you are running the latest packages provided by the base image project.

License

Author Information