Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 1.52 KB

File metadata and controls

42 lines (35 loc) · 1.52 KB

docker-php

For complete list of tags see Docker Hub.
For Documentation please refer to PHP official repo.

Added Features

  • Composer installed
  • .htaccess enabled
  • TZ env
  • HOST_ID and HOST_GID env for permission issues related to cross-container volume mounting (e.g. sftp and ssh containers)
  • COMPOSER_DIR and COMPOSER_DIRS env for composer install at startup, to fix overwriting of vendor directory when mounting a volume
  • Pre-installed PHP extensions
    • mysqli
    • pdo
    • pdo_mysql
    • zip
    • intl
    • opcache
    • xml

Environment variables (Optional)

Docker Environment Description
TZ Set the System Timezone
PWD The Container Workdir (/var/www/html)
HOST_ID The Container User ID
HOST_GID The Container Group ID
INI_ENV Use development or production .ini file (default to production)
COMPOSER_DIR Composer install directory, can be absolute or relative to PWD
COMPOSER_DIRS Composer install directories separated by space, can be absolute or relative to PWD

Manually update php.ini

If you have manually configured php.ini, you can replace the default .ini files.

FROM lighty262/php:latest-apache

COPY php.ini /usr/local/etc/php/php.ini-development
COPY php.ini /usr/local/etc/php/php.ini-production
COPY php.ini /usr/local/etc/php/php.ini