Files
docker-php-fpm/build/ansible/group_vars/all.yml
2018-08-04 16:55:11 +02:00

1401 lines
42 KiB
YAML

---
################################################################################
# Variables for rendering Dockerfiles and configuration
################################################################################
###
### Available PHP versions
###
php_all_versions:
- 5.2
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
###
### PHP settings equal for php.ini and php-fpm.comf (used below)
###
php_timeout: 120
###
### PHP.ini
###
php_settings_ini:
# ---- Sane default ----
base:
# Memory
memory_limit: 512M
# Timeouts
max_execution_time: "{{ php_timeout }}"
max_input_time: "{{ php_timeout }}"
# Uploads
# Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size: 72M
upload_max_filesize: 64M
max_file_uploads: 20
# Variables
variables_order: EGPCS
max_input_vars: 8000
max_input_nesting_level: 64
# Error reporting
error_reporting: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors: 'Off'
report_memleaks: 'On'
display_errors: 'Off'
display_startup_errors: 'Off'
track_errors: 'On'
log_errors: 'On'
html_errors: 'Off'
# Xdebug settings
xdebug_default_enable: 'Off'
xdebug_profiler_enable: 'Off'
xdebug_remote_enable: 'Off'
xdebug_remote_autostart: 'Off'
# ---- Inherits from base ----
mods:
# ---- Inherits from base ----
prod:
# ---- Inherits from base and overwrites certain values ----
work:
# Error reporting
error_reporting: E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors: 'Off'
report_memleaks: 'On'
display_errors: 'On'
display_startup_errors: 'On'
track_errors: 'On'
log_errors: 'On'
html_errors: 'On'
# Xdebug settings
xdebug_default_enable: 'Off'
xdebug_profiler_enable: 'Off'
xdebug_remote_enable: 'Off'
xdebug_remote_autostart: 'Off'
###
### PHP-FPM.conf
###
php_settings_fpm:
# ---- Sane default ----
base:
# Docker
clear_env: 'no'
catch_workers_output: 'yes'
# Timeouts
request_terminate_timeout: "{{ php_timeout }}s"
# Network
listen: 9000
# Backlog
listen_backlog: 1024
# Logging
log_level: notice
error_log: /proc/self/fd/2
access_log: /proc/self/fd/2
# Worker
pm: ondemand
pm_max_children: 50 # pm: dynamic, ondemand or static
pm_start_servers: 4 # only for pm: dynamic (min_spare + (max_spare-min_spare)/2
pm_min_spare_servers: 2 # only for pm: dynamic
pm_max_spare_servers: 6 # only for pm: dynamic
pm_max_requests: 500 # pm: dynamic or ondemand
pm_process_idle_timeout: 10s # only for pm: ondemand
# User/Group
user: devilbox
group: devilbox
# ---- Inherits from base ----
mods:
# ---- Inherits from base ----
prod:
# ---- Inherits from base and overwrites certain values ----
work:
###
### Templates for PHP flavours (base, mods, prod and work) for all PHP versions
###
# Dockerfiles for base, mods, prod and work
template_dockerfiles:
- src: DOCKERFILES/Dockerfile-base.j2
dst: "../../Dockerfiles/base/Dockerfile-{{ php_version }}"
- src: DOCKERFILES/Dockerfile-mods.j2
dst: "../../Dockerfiles/mods/Dockerfile-{{ php_version }}"
- src: DOCKERFILES/Dockerfile-prod.j2
dst: "../../Dockerfiles/prod/Dockerfile-{{ php_version }}"
- src: DOCKERFILES/Dockerfile-work.j2
dst: "../../Dockerfiles/work/Dockerfile-{{ php_version }}"
# Configuration files for base, mods, prod and work
template_configurations:
# php.ini
- src: CONFIGURATIONS/php.ini.j2
dst: "../../Dockerfiles/base/data/php-ini.d/php-{{ php_version }}.ini"
cfg: "{{ php_settings_ini }}"
key: base
alt: base
- src: CONFIGURATIONS/php.ini.j2
dst: "../../Dockerfiles/work/data/php-ini.d/php-{{ php_version }}.ini"
cfg: "{{ php_settings_ini }}"
key: work
alt: base # Alternative key to use when definition is not set in 'work'
# php-fpm.conf
- src: CONFIGURATIONS/php-fpm.conf.j2
dst: "../../Dockerfiles/base/data/php-fpm.conf/php-fpm-{{ php_version }}.conf"
cfg: "{{ php_settings_fpm }}"
key: base
alt: base
- src: CONFIGURATIONS/php-fpm.conf.j2
dst: "../../Dockerfiles/work/data/php-fpm.conf/php-fpm-{{ php_version }}.conf"
cfg: "{{ php_settings_fpm }}"
key: work
alt: base
###
### Variables to be used in this file (group_vars/all.yml)
###
# Adds self-validating checks to Dockerfile
# turn off for final build
debug: True
# Global variables
compose_home: /usr/local/src/composer
################################################################################
# Defines for Dockerfile "work"
################################################################################
###
### Apt repositories to actually enable
###
apt_repositories_enabled:
- backports
- git
- mongo
- node
- pgsql
- yarn
###
### Software to actually install
###
software_enabled:
# Composer needs to be first, others rely on it
- composer
# Normal packages start here
- ansible
- awesomeci
- codeception
- drush
- drupalconsole
- gitflow
- grunt
- laravel
- linkcheck
- linuxbrew
- mhsendmail
- mysqldumpsecure
- phalcon
- phpcs
- phpcbf
- phpunit
- photon
- sass
- symfony
- webpack
- wpcli
- yamllint
# Cleanup needs to be last
- cleanup
###
### All available extra repositories
###
# all: is generic version of defines
# 7.2: is specific version of defines
# disabled: [optional] Array of PHP versions for which to disable this module
#
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# deb: Deb line to add to sources list
# key: [optional] Key id to add for repository
# pre: [optional] Run custom command to add gpg key for repository
#
apt_repositories_available:
backports:
all:
deb: deb http://ftp.debian.org/debian jessie-backports main
git:
7.2:
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
7.3:
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
all:
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main
key: A1715D88E1DF1F24
mongo:
all:
deb: deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main
key: 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
node:
7.2:
deb: deb http://deb.nodesource.com/node_8.x stretch main
7.3:
deb: deb http://deb.nodesource.com/node_8.x stretch main
all:
deb: deb http://deb.nodesource.com/node_8.x jessie main
pre: curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add -
pgsql:
7.2:
deb: deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
7.3:
deb: deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
all:
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
pre: curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add -
yarn:
all:
deb: deb http://dl.yarnpkg.com/debian/ stable main
pre: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
###
### All available software
###
# all: is generic version of defines
# 7.2: is specific version of defines
# disabled: [optional] Array of PHP versions for which to disable this module
# check: [optional] Include a check command to test if it was installed successfully
#
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# pre: [optional] Run command before 'command:' statement
# command: Command to execute
# pre: [optional] Run command after 'command:' statement
#
software_available:
ansible:
check: ansible --version | grep -E '^ansible [.0-9]+$'
all:
command: |
pip install --upgrade setuptools \
&& pip install ansible \
awesomeci:
check: |
mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
all:
command: |
git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
&& ./configure --prefix=/usr/local \
&& make install \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
# awesome-ci requirements
post: |
gem install mixlib-config -v 2.2.4 \
&& gem install mdl \
&& gem install scss_lint \
&& npm install -g eslint \
&& npm install -g jsonlint \
&& npm install -g mdlint \
&& npm install -g gulp \
composer:
disabled: [5.2]
check: composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+'
all:
command: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
drush:
disabled: [5.2]
check: drush --version | grep -E '[.0-9]+'
5.2:
pre: |
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout 7.4.0 \
5.3:
pre: |
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout 7.4.0 \
5.4:
pre: |
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \
5.5:
pre: |
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \
all:
pre: |
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
&& rm -rf /usr/local/src/drush/.git \
&& rm -rf /usr/local/src/drush/docs \
&& rm -rf /usr/local/src/drush/examples \
&& rm -rf /usr/local/src/drush/misc \
&& rm -rf /usr/local/src/drush/tests \
codeception:
disabled: [5.2]
check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$'
all:
command: |
COMPOSER_HOME="{{ compose_home }}" composer global require codeception/codeception --dev \
&& ln -s {{ compose_home }}/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
drupalconsole:
disabled: [5.2, 5.3, 5.4]
check: drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]'
all:
command: curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal
post: chmod +x /usr/local/bin/drupal
gitflow:
check: git-flow version | grep -E '[.0-9]+'
all:
command: |
git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
grunt:
check: grunt --version | grep -E '[.0-9]+'
all:
command: npm install -g grunt grunt-cli
laravel:
check: laravel --version | grep -E '(Installer|version)\s*[.0-9]+'
disabled: [5.2, 5.3]
5.4:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v1.3.7 \
5.5:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
5.6:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
7.0:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
all:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \
command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
linkcheck:
check: linkcheck --version | grep -E '^linkcheck\sv[.0-9]+'
all:
command: |
curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
linuxbrew:
check: su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+'
all:
command: |
git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
mhsendmail:
all:
command: |
wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
mysqldumpsecure:
check: mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+'
all:
command: |
git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
&& cp /usr/local/src/mysqldump-secure/bin/mysqldump-secure /usr/local/bin \
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.conf /etc \
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.cnf /etc \
&& touch /var/log/mysqldump-secure.log \
&& chown ${MY_USER}:${MY_GROUP} /etc/mysqldump-secure.* \
&& chown ${MY_USER}:${MY_GROUP} /var/log/mysqldump-secure.log \
&& chmod 0400 /etc/mysqldump-secure.conf \
&& chmod 0400 /etc/mysqldump-secure.cnf \
&& chmod 0644 /var/log/mysqldump-secure.log \
&& sed -i'' 's/^COMPRESS_ARG=.*/COMPRESS_ARG="-9 -c"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^DUMP_DIR=.*/DUMP_DIR="\/shared\/backups\/mysql"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^DUMP_DIR_CHMOD=.*/DUMP_DIR_CHMOD="0755"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^DUMP_FILE_CHMOD=.*/DUMP_FILE_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^LOG_CHMOD=.*/LOG_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^NAGIOS_LOG=.*/NAGIOS_LOG=0/g' /etc/mysqldump-secure.conf \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
phalcon:
disabled: [5.2, 7.3]
check: phalcon commands | grep -E '[.0-9]+'
5.3:
pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.7 \
5.4:
pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.9 \
all:
pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
phpcs:
check: phpcs --version | grep -E 'version [.0-9]+'
5.2:
command: |
curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
5.3:
command: |
curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
all:
command: |
curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
phpcbf:
check: phpcbf --version | grep -E 'version [.0-9]+'
5.2:
command: |
curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
5.3:
command: |
curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
all:
command: |
curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
phpunit:
disabled: [5.2]
check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+'
5.3:
command: |
curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
5.4:
command: |
curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
5.5:
command: |
curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
5.6:
command: |
curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
7.0:
command: |
curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
all:
command: |
curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
photon:
disabled: [5.2, 5.3, 5.4]
check: photon --version | grep -E 'Installer [.0-9]+'
all:
command: |
COMPOSER_HOME="{{ compose_home }}" composer global require "photoncms/installer" \
&& ln -s {{ compose_home }}/vendor/photoncms/installer/photon /usr/local/bin/photon \
sass:
check: sass --version | grep -E '[.0-9]+'
all:
command: gem install sass
symfony:
disabled: [5.2, 5.3]
check: symfony --version | grep -E 'version\s*[.0-9]+'
all:
command: curl https://symfony.com/installer -L -o /usr/local/bin/symfony
post: chmod +x /usr/local/bin/symfony
wpcli:
disabled: [5.2]
check: wp --allow-root --version | grep -E '[.0-9]+'
all:
command: curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp
post: chmod +x /usr/local/bin/wp
webpack:
check: webpack --version | grep -E '[.0-9]+'
all:
command: npm install -g webpack webpack-cli
yamllint:
check: yamllint --version 2>&1 | grep -E '[.0-9]+'
all:
pre: apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev
command: pip install yamllint
post: apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/*
cleanup:
all:
command: |
rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
&& rm -rf /home/${MY_USER}/.config \
&& rm -rf /home/${MY_USER}/.drush \
&& rm -rf /home/${MY_USER}/.gem \
&& rm -rf /home/${MY_USER}/.npm \
&& rm -rf /home/${MY_USER}/.subversion \
\
&& rm -rf /root/.*json \
&& rm -rf /root/.cache \
&& rm -rf /root/.composer \
&& rm -rf /root/.config \
&& rm -rf /root/.drush \
&& rm -rf /root/.gem \
&& rm -rf /root/.npm \
&& rm -rf /root/.subversion \
\
&& rm -rf /tmp/* \
################################################################################
# Defines for Dockerfile "mods"
################################################################################
###
### Extensions to actually enable
###
extensions_enabled:
# ioncube must be loaded first
- ioncube
- amqp
- apcu
- bcmath
- bz2
- calendar
- ctype
- curl
- dba
- dom
- enchant
- exif
- fileinfo
- filter
- ftp
- gd
- gettext
- gmp
- hash
- iconv
- igbinary
- imagick
- imap
- interbase
- intl
- json
- ldap
- libxml
- mbstring
- mcrypt
- memcache
- memcached
- mongo
- mongodb
- msgpack
- mysql
- mysqli
- mysqlnd
- oci8
- odbc
- opcache
- openssl
- pcntl
- pcre
- pdo
- pdo_dblib
- pdo_firebird
- pdo_mysql
- pdo_oci
- pdo_odbc
- pdo_pgsql
- pdo_sqlite
- pgsql
- phalcon
- phar
- posix
- pspell
- readline
- recode
- redis
- session
- shmop
- simplexml
- snmp
- soap
- sockets
- sodium
- spl
- swoole
- sysvmsg
- sysvsem
- sysvshm
- tidy
- tokenizer
- uploadprogress
- wddx
- xdebug
- xml
- xmlreader
- xmlrpc
- xmlwriter
- xsl
- zip
###
### All available php modules
###
# all: is generic version of defines
# 7.2: is specific version of defines
# disabled: [optional] Array of PHP versions for which to disable this module
#
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# pre: [optional] Run command before anything else
# build_dep: [optional] Array of build dependencies
# run_dep: [optional] Array of run-time dependencies
# type: [required] One of 'builtin', 'pecl' or 'git'
#
# type: builtin
# configure: [optional] Add './configure' arguments
# type: pecl
# version: [optional] Pecl packet version
# command: [optional] Overwrite pecl command (pecl install ext)
# type: git
# git_url: [required] Git repository URL
# git_ref: [optional] Tag, branch, commit to checkout
# configure: [optional] Add './configure' arguments
# command: [optional] Overwrite default command (phpize && ./configure && make && make install)
# type: custom
# command: [required] Custom command to install and enable a module
extensions_available:
amqp:
disabled: [7.3]
5.2:
run_dep: [librabbitmq1]
type: pecl
version: 1.4.0
5.3:
run_dep: [librabbitmq1]
5.4:
run_dep: [librabbitmq1]
5.5:
run_dep: [librabbitmq1]
all:
type: pecl
command: echo "/usr" | pecl install amqp
build_dep: [librabbitmq-dev]
run_dep: [librabbitmq4]
apcu:
disabled: [5.2]
5.3:
type: pecl
version: 4.0.11
5.4:
type: pecl
version: 4.0.11
5.5:
type: pecl
version: 4.0.11
5.6:
type: pecl
version: 4.0.11
all:
type: pecl
bcmath:
all:
type: builtin
bz2:
all:
type: builtin
build_dep: [libbz2-dev]
calendar:
all:
type: builtin
ctype:
all:
type: builtin
curl:
all:
type: builtin
build_dep: [libcurl4-openssl-dev]
dba:
all:
type: builtin
dom:
all:
type: builtin
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
enchant:
5.2:
type: pecl
command: echo "/usr" | pecl install enchant
all:
type: builtin
build_dep: [libenchant-dev]
run_dep: [libenchant1c2a]
exif:
all:
type: builtin
fileinfo:
5.2:
type: pecl
build_dep: [libmagic-dev]
all:
type: builtin
filter:
disabled: "{{ php_all_versions }}" # Available by default
ftp:
all:
type: builtin
configure: --with-openssl-dir
build_dep: [libssl-dev]
gd:
5.2:
type: builtin
pre: |
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \
ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \
ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \
mkdir /usr/include/freetype2/freetype && \
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
configure: --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.3:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
configure: --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.4:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.5:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.6:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
7.0:
type: builtin
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
7.1:
type: builtin
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
7.2:
type: builtin
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv
7.3:
type: builtin
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv
all:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev]
run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6]
gettext:
all:
type: builtin
gmp:
disabled: [5.2]
all:
type: builtin
pre: ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/
build_dep: [libgmp-dev]
hash:
all:
type: builtin
iconv:
all:
type: builtin
igbinary:
all:
type: pecl
imagick:
disabled: [5.2]
5.3:
type: pecl
version: 3.3.0
run_dep: [libmagickwand-6.q16-2]
5.4:
type: pecl
run_dep: [libmagickwand-6.q16-2]
5.5:
type: pecl
run_dep: [libmagickwand-6.q16-2]
all:
type: pecl
build_dep: [libmagickwand-dev]
run_dep: [libmagickwand-6.q16-3]
imap:
all:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/
configure: --with-kerberos --with-imap-ssl --with-imap
build_dep: [libc-client-dev, libkrb5-dev, libcurl4-openssl-dev]
run_dep: [libc-client2007e]
interbase:
all:
type: builtin
build_dep: [libfbclient2, libib-util, firebird-dev]
run_dep: [libfbclient2]
intl:
5.2:
type: pecl
run_dep: [libicu52]
5.3:
type: builtin
run_dep: [libicu52]
5.4:
type: builtin
run_dep: [libicu52]
5.5:
type: builtin
run_dep: [libicu52]
all:
type: builtin
build_dep: [libicu-dev]
run_dep: [libicu57]
ioncube:
disabled: [7.3]
all:
type: custom
command: |
EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_{{ php_version }}.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
json:
7.0:
type: builtin
build_dep: [bison]
all:
type: builtin
ldap:
all:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/
configure: --with-ldap --with-ldap-sasl
build_dep: [libldap2-dev, libsasl2-dev]
libxml:
disabled: "{{ php_all_versions }}" # Available by default
mbstring:
disabled: [7.3]
all:
type: builtin
mcrypt:
7.2:
type: pecl
version: 1.0.1
7.3:
type: pecl
version: 1.0.1
all:
type: builtin
run_dep: [libmcrypt4]
build_dep: [libmcrypt-dev]
memcache:
disabled: [7.3]
7.0:
type: git
git_url: https://github.com/websupport-sk/pecl-memcache
configure: --with-zlib-dir=/usr
7.1:
type: git
git_url: https://github.com/websupport-sk/pecl-memcache
configure: --with-zlib-dir=/usr
7.2:
type: git
git_url: https://github.com/websupport-sk/pecl-memcache
configure: --with-zlib-dir=/usr
all:
type: pecl
build_dep: [zlib1g-dev]
memcached:
5.2:
type: pecl
version: 2.1.0
5.3:
type: pecl
version: 2.2.0
5.4:
type: pecl
version: 2.2.0
5.5:
type: pecl
version: 2.2.0
5.6:
type: pecl
version: 2.2.0
7.3:
type: git
git_url: https://github.com/php-memcached-dev/php-memcached
git_ref: master
command: phpize && ./configure --enable-memcached && make -j$(getconf _NPROCESSORS_ONLN) && make install
all:
type: pecl
build_dep: [zlib1g-dev, libmemcached-dev]
run_dep: [libmemcachedutil2]
mongo:
disabled: [7.0, 7.1, 7.2, 7.3] # Deprecated
5.2:
type: pecl
command: yes | pecl install mongo-1.5.8
all:
type: pecl
command: yes | pecl install mongo
build_dep: [libssl-dev, libsasl2-dev]
mongodb:
disabled: [5.2]
5.3:
type: pecl
version: 0.6.3
5.4:
type: pecl
version: 1.2.11
all:
type: pecl
build_dep: [libssl-dev, libsasl2-dev]
msgpack:
disabled: [7.3]
5.2:
type: pecl
version: 0.5.7
5.3:
type: pecl
version: 0.5.7
5.4:
type: pecl
version: 0.5.7
5.5:
type: pecl
version: 0.5.7
5.6:
type: pecl
version: 0.5.7
all:
type: pecl
mysql:
disabled: [7.0, 7.1, 7.2, 7.3] # Deprecated in newer versions
5.6:
type: builtin
run_dep: [libmariadbclient18]
all:
type: builtin
run_dep: [libmysqlclient18]
mysqli:
all:
type: builtin
mysqlnd:
disabled: "{{ php_all_versions }}" # Available by default
oci8:
disabled: "{{ php_all_versions }}" # TODO: Oracle library is missing
odbc:
disabled: "{{ php_all_versions }}" # TODO: sqlext.h' not found!
opcache:
5.2:
type: pecl
command: pecl install zendopcache
5.3:
type: pecl
command: pecl install zendopcache
5.4:
type: pecl
command: pecl install zendopcache
all:
type: builtin
openssl:
disabled: "{{ php_all_versions }}" # Available by default
pcntl:
all:
type: builtin
pcre:
disabled: "{{ php_all_versions }}" # Available by default
pdo:
# https://github.com/docker-library/php/issues/618
disabled: [7.0] # TODO: Currently disabled due to bug in built
all:
type: builtin
pdo_dblib:
all:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/
build_dep: [freetds-dev]
run_dep: [libsybdb5]
pdo_firebird:
all:
type: builtin
build_dep: [libfbclient2, libib-util, firebird-dev]
run_dep: [libfbclient2]
pdo_mysql:
all:
type: builtin
configure: --with-zlib-dir=/usr
build_dep: [zlib1g-dev]
pdo_oci:
disabled: "{{ php_all_versions }}" # TODO: Oracle library is missing
pdo_odbc:
disabled: "{{ php_all_versions }}" # TODO: Build errors
pdo_pgsql:
all:
type: builtin
build_dep: [libpq-dev]
run_dep: [libpq5]
pdo_sqlite:
all:
type: builtin
build_dep: [libsqlite3-dev]
pgsql:
all:
type: builtin
build_dep: [libpq-dev]
run_dep: [libpq5]
phalcon:
disabled: [5.2, 7.3]
5.3:
type: git
git_url: https://github.com/phalcon/cphalcon
git_ref: phalcon-v2.0.9
command: cd build && ./install
5.4:
type: git
git_url: https://github.com/phalcon/cphalcon
git_ref: phalcon-v2.0.13
command: cd build && ./install
# 7.3:
# type: git
# git_url: https://github.com/phalcon/cphalcon
# git_ref: $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g')
# # TODO: Workaround to make it compile on PHP 7.3
# command: cd build && echo > php7/64bits/phalcon.zep.c && ./install
all:
type: git
git_url: https://github.com/phalcon/cphalcon
git_ref: $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g')
command: cd build && ./install
phar:
# https://github.com/docker-library/php/issues/618
disabled: [5.6, 7.0] # TODO: Currently disabled due to bug in built
5.2:
type: pecl
all:
type: builtin
build_dep: [libssl-dev]
posix:
all:
type: builtin
pspell:
all:
type: builtin
build_dep: [libpspell-dev]
run_dep: [libaspell15]
readline:
disabled: [5.2, 5.3, 5.4] # Available by default
all:
type: builtin
build_dep: [libedit-dev, libreadline-dev]
recode:
all:
type: builtin
build_dep: [librecode-dev]
run_dep: [librecode0]
redis:
5.2:
type: pecl
version: 2.2.7
all:
type: pecl
session:
all:
type: builtin
configure: --with-mm
build_dep: [libmm-dev]
shmop:
all:
type: builtin
simplexml:
all:
type: builtin
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
snmp:
all:
type: builtin
configure: --with-openssl-dir
build_dep: [libssl-dev, libsnmp-dev, snmp]
run_dep: [snmp]
soap:
all:
type: builtin
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
sockets:
all:
type: builtin
sodium:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1]
all:
type: builtin
build_dep: [libsodium-dev]
spl:
disabled: "{{ php_all_versions }}" # TODO: Did not work
swoole:
disabled: [5.2]
5.3:
type: pecl
version: 1.9.23
run_dep: [libnghttp2-5]
5.4:
type: pecl
version: 1.9.23
run_dep: [libnghttp2-5]
5.5:
type: pecl
version: 1.9.23
run_dep: [libnghttp2-5]
5.6:
type: pecl
version: 1.9.23
7.0:
type: pecl
version: 2.2.0
7.3:
type: git
git_url: https://github.com/swoole/swoole-src
git_ref: master
command: |
git submodule update --init --recursive \
&& cd thirdparty/hiredis \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd ../nghttp2 \
&& cmake . \
&& make install \
&& ldconfig \
&& cd ../.. \
&& phpize \
&& ./configure \
--enable-async-redis \
--enable-openssl \
--enable-thread \
--enable-swoole \
--enable-swoole-static \
--with-swoole \
--with-openssl-dir=/usr \
--enable-mysqlnd \
--enable-coroutine \
--enable-picohttpparser \
#`--enable-timewheel` \
#`--enable-hugepage` \
#`--enable-asan` \
#`--with-phpx-dir=` \
#`--with-jemalloc-dir=/usr/include/jemalloc` \
#`--enable-coroutine-postgresql` \
#`--enable-http2` \
#`--enable-sockets` \
#`--with-libpq-dir=/usr/include/postgresql/libpq/` \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
run_dep: [libnghttp2-14, libhiredis0.13]
build_dep: [libnghttp2-dev, libssl-dev, libhiredis-dev, cmake]
all:
type: pecl
build_dep: [libnghttp2-dev, libssl-dev]
run_dep: [libnghttp2-14]
sysvmsg:
all:
type: builtin
sysvsem:
all:
type: builtin
sysvshm:
all:
type: builtin
tidy:
5.2:
type: builtin
run_dep: [libtidy-0.99-0]
5.3:
type: builtin
run_dep: [libtidy-0.99-0]
5.4:
type: builtin
run_dep: [libtidy-0.99-0]
5.5:
type: builtin
run_dep: [libtidy-0.99-0]
all:
type: builtin
build_dep: [libtidy-dev]
run_dep: [libtidy5]
tokenizer:
all:
type: builtin
uploadprogress:
7.0:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
7.1:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
7.2:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
7.3:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
all:
type: pecl
wddx:
all:
type: builtin
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
xdebug:
disabled: [7.3]
5.2:
type: pecl
version: 2.2.7
5.3:
type: pecl
version: 2.2.7
5.4:
type: pecl
version: 2.4.1
5.5:
type: pecl
version: 2.4.1
5.6:
type: pecl
version: 2.4.1
all:
type: pecl
xml:
all:
type: builtin
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
xmlreader:
disabled: [7.0, 7.1, 7.2, 7.3] # Available by default
all:
type: builtin
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
xmlrpc:
all:
type: builtin
configure: --with-libxml-dir=/usr --with-iconv-dir=/usr
build_dep: [libxml2-dev]
xmlwriter:
all:
type: builtin
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
xsl:
all:
type: builtin
build_dep: [libxslt-dev]
run_dep: [libxslt1.1]
zip:
5.2:
type: builtin
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr
build_dep: [zlib1g-dev]
run_dep: []
5.3:
type: builtin
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr
build_dep: [zlib1g-dev]
run_dep: []
5.4:
type: builtin
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr
build_dep: [zlib1g-dev]
run_dep: []
5.5:
type: builtin
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr
build_dep: [zlib1g-dev]
run_dep: []
all:
type: builtin
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip
build_dep: [zlib1g-dev, libzip-dev]
run_dep: [libzip4]