Public Repository

Last pushed: 10 months ago
Short Description
Neverbland's PHP image.
Full Description

PHP

This image is always based on Alpine 3.3.

Extra tools

There are a few tools (ash scripts) available to ease some cumbersome common tasks.
They sit in /usr/local/bin so you can use them as commands in your RUN or scripts.
Angled brackets mean mandatory arguments, square brackets are optional;
within the square brackets the default will be given as well.

update_mods

Simply makes sure that the list of extensions in /etc/php/mods is up to date.
Removes missing extensions, adds new ones.
Does not enable or disable any (unless they're missing, in which case they're disabled).

enable_ext

enable_ext <extension name> [priority=20] [target=both]

Enables the given extension (name of the ini file!) with the given priority for the given target(s).
target can be one of both, cli or fpm if provided.

disable_ext

disable_ext <extension name> [target=both]

Disables the given extension. target can be one of both, cli or fpm if provided.

install_phar

install_phar <name> <url>

Installs the PHAR from url as /usr/local/bin/<name> to make them globally available.
Captain Obvious' example would be composer: install_phar composer https://getcomposer.org/composer.phar

compile_ext

compile_ext [-b [branch=master]] <extension name> <repo URL> [./configure options]

Performs the standard compilation scripts common (below) for most PHP extensions in a single command.
Optionally lets you provide extra configure options or a branch to use.

git clone https://github.com/vendor/php-ext
cd php-ext
phpize
./configure
make
make install

As an example, this is actually used in the build scripts as well (something about dogfood).
Here's the usage for xdebug for example:

compile_ext -b master xdebug \
    https://github.com/xdebug/xdebug.git \
    --enable-xdebug

Extensions

Static

TBD

Dynamic

By default, we have the following extensions compiled and ready to be used in all PHP versions.
The first cross marks whether they're also enabled on the CLI,
second whether they're enabled for FPM.

Non-ZTS:

  • [X] [X] opcache
  • [X] [X] pdo
  • [X] [X] curl
  • [ ] [ ] dba
  • [ ] [ ] enchant
  • [X] [X] gd
  • [X] [X] gmp
  • [ ] [ ] imap
  • [X] [X] intl
  • [ ] [ ] ldap
  • [X] [X] mcrypt
  • [X] [X] memcached
  • [X] [X] mysqli
  • [ ] [ ] odbc
  • [ ] [ ] pdo_dblib
  • [X] [X] pdo_mysql
  • [ ] [ ] pdo_odbc
  • [ ] [ ] pdo_pgsql
  • [ ] [ ] pdo_sqlite
  • [ ] [ ] pgsql
  • [X] [X] redis
  • [ ] [ ] snmp
  • [ ] [ ] sqlite3
  • [ ] [ ] xdebug

ZTS (in addition to all of the above):

  • [X] [ ] pthreads
Docker Pull Command
Owner
neverbland

Comments (0)