Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Linux for PHP Banner

https://linuxforphp.net

Linux for PHP for CI

Build Status

CHANGELOG

Linux for PHP Docker images for continuous integration and running tests. These images can be used with GitLab CI, or any automated testing system or as standalone services.

Supported tags and respective Dockerfile links

These images are built from Linux for PHP official Docker images, and additionally include:

  • All extensions are compiled and ready and loaded,
  • PECL extensions: memcached, redis, mongodb, xdebug,
  • sendmail command via msmtp, configured as relay to localhost. Check /etc/msmtprc to setup relay server,
  • Git client,
  • Composer,
  • PHPUnit - latest stable version for php >= 5.6 and PHPUnit 4.8 for php < 5.6,
  • PHP Code Sniffer - latest stable version of phpcs and phpcbf commands,
  • Node.js v10 from official Node.js repositories.

Advantages of these images

  • Builds are based on the official Linux for PHP images (standard C toolchain).
  • Automatically rebuilt when official images are updated, so this repository always contains the latest versions.

Quick start guide

Check the Quick start guide

Check the Example projects

PHP modules

All major modules are enabled by default (compiled-in) and some are installed using PECL.

Compiled-in modules

bcmath bz2 calendar ctype curl date dba dom ereg enchant exif fileinfo filter ftp gd gettext gmp hash iconv imap intl json ldap libxml mbstring mcrypt mssql mysqli mysqlnd opcache openssl pcntl pcre pdo pdo_dblib pdo_mysql pdo_pgsql pdo_sqlite pgsql phar posix pspell readline recode reflection session shmop simplexml snmp soap sockets spl sqlite3 standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib

Available core modules

Available PECL modules

memcached mongodb redis xdebug

For more information check the GitHub repository.

Environment variables

There are environment variables which can be passed to images on docker run.

  • WITHOUT_XDEBUG=1 - disables xdebug extension,

  • TIMEZONE=America/New_York - set system and php.ini timezone. You can also set timezone in .gitlab-ci.yml - check Example,

  • COMPOSER_GITHUB=<YOUR_GITHUB_TOKEN> - Adds GitHub oauth token for Composer, which allows Composer to get unlimited repositories from Github without blocking non-interactive mode with request for authorization. You can obtain your token at https://github.com/settings/tokens.

    Composer documentation about Github API rate limit

FAQ

  1. How to set custom php.ini values

    Easiest way is to mount your local php.ini on container start like docker run ... -v /home/user/php.ini:/etc/php.ini ...