Skip to content

Repository files navigation

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 EnvironmentDescription
TZSet the System Timezone
PWDThe Container Workdir (/var/www/html)
HOST_IDThe Container User ID
HOST_GIDThe Container Group ID
INI_ENVUse development or production .ini file (default to production)
COMPOSER_DIRComposer install directory, can be absolute or relative to PWD
COMPOSER_DIRSComposer 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

About

Alternative PHP Docker repository with modification for out-of-the-box ready to use image

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages