5 Star 26 Fork 6

xiaoyu / dnmp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
install-php-extensions.md 23.18 KB
一键复制 编辑 原始数据 按行查看 历史

Supported PHP extensions

Extension PHP 5.5 PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4 PHP 8.0 PHP 8.1 PHP 8.2 PHP 8.3
amqp
apcu
apcu_bc
ast
bcmath
bitset
blackfire
bz2
calendar
cassandra*
cmark
csv
dba
ddtrace*
decimal
ds
ecma_intl*
enchant
ev
event
excimer
exif
ffi
ftp
gd
gearman
geoip
geos*
geospatial
gettext
gmagick
gmp
gnupg
grpc
http
igbinary
imagick
imap
inotify
interbase
intl
ion
ioncube_loader
jsmin
json_post
jsonpath
ldap
luasandbox
lz4*
lzf
mailparse
maxminddb
mcrypt
memcache
memcached
memprof*
mongo
mongodb
mosquitto
msgpack
mssql
mysql
mysqli
oauth
oci8
odbc
opcache
opencensus
openswoole
opentelemetry
parallel*
parle*
pcntl
pcov
pdo_dblib
pdo_firebird
pdo_mysql
pdo_oci
pdo_odbc
pdo_pgsql
pdo_sqlsrv*
pgsql
php_trie
pkcs11
pq
propro
protobuf
pspell
pthreads*
raphf
rdkafka
recode
redis
relay
saxon*
seasclick
seaslog
shmop
simdjson*
smbclient
snappy
snmp
snuffleupagus
soap
sockets
sodium*
solr
sourceguardian
spx
sqlsrv*
ssh2
stomp
swoole
sybase_ct
sync
sysvmsg
sysvsem
sysvshm
tensor
tideways
tidy
timezonedb
uopz
uploadprogress
uuid
uv
vips*
vld
wddx
xdebug
xdiff
xhprof
xlswriter
xmldiff
xmlrpc
xsl
yac
yaml
yar
zephir_parser
zip
zmq
zookeeper
zstd

Number of supported extensions: 142

PS: the pre-installed PHP extensions are excluded from this list. You can list them with the following command (change php:7.2-cli to reflect the PHP version you are interested in):

$ docker run --rm php:7.2-cli php -m
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

Configuration

You can configure the behavior of the script, as well as fine-tune some extensions in order fit your needs, by using environment variables.

Here's an example:

IPE_LZF_BETTERCOMPRESSION=1 install-php-extensions lzf

Here's the list of all the supported environment variables:

Extension Environment variable Description
IPE_DEBUG=1 By setting this environment variable, the script will print all the commands it executes (it will be very verbose, useful only for debug purposes)
IPE_PROCESSOR_COUNT Set this environment variable to override the number of processors detected by the script (used for parallel compilation)
IPE_DONT_ENABLE=1 By default the script will install and enable the extensions.
If you want to only install them (without enabling them) you can set this environment variable.
To enable the extensions at a later time you can execute the command docker-php-ext-enable-<extension> (for example: docker-php-ext-enable-xdebug).
Beware: installing some PHP extensions require that other PHP extensions are already enabled, so use this feature wisely.
IPE_KEEP_SYSPKG_CACHE=1 By default the script will clear the apt/apk/pear cache in order to save disk space. You can disable it by setting this environment variable
lzf IPE_LZF_BETTERCOMPRESSION=1 By default install-php-extensions compiles the lzf extension to prefer speed over size; you can use this environment variable to compile it preferring size over speed
event IPE_EVENT_NAMESPACE=... By default the event classes are defined in the root namespace. You can use this environment variable to specify a custom namespace
gd IPE_GD_WITHOUTAVIF=1 Since PHP 8.1, gd supports the AVIF format. Enabling it requires compiling libaom/libdav1d/libyuv/libavif on Debian 11- and Alpine 3.14-, which is time-consuming. You can disable AVIF support by setting this environment variable on Debian 11- and Alpine 3.14-
oci8 & pdo_oci IPE_INSTANTCLIENT_BASIC=1 The oci8 and pdo_oci PHP extensions require Oracle Instant Client. In order to save disk space, we install the Basic Lite version: if you want to install the Basic (non-lite) version simply set this environment variable
http, intl, mongodb IPE_ICU_EN_ONLY=1 Some extensions require the ICU library, use this flag to install a smaller, but English-only, ICU library on Alpine 3.16 and later
pspell IPE_ASPELL_LANGUAGES='...' Configure the languages to be made available (for example: IPE_ASPELL_LANGUAGES='en fr'). If omitted, we'll assume en
IPE_DEB_ARCHIVE & IPE_DEB_ARCHIVE_SECURITY The APT packages of very old Debian versions (eg Jessie) may have been archived: you can use these environment variables to specify custom URLs of these APT archives

Special requirements

Some extensions have special requirements:

Extension Requirements
cassandra • Not available in jessie docker images
• Not available in stretch docker images
• Not available in buster docker images
• Not available in bullseye docker images
• Not available in bookworm docker images
ddtrace Not available in jessie docker images
ecma_intl • Not available in buster docker images
• Not available in bullseye docker images
geos • Not available in alpine3.9 docker images
• Not available in alpine3.10 docker images
lz4 Not available in jessie docker images
memprof • Not available in alpine3.9 docker images
• Not available in alpine3.10 docker images
• Not available in alpine3.11 docker images
• Not available in alpine3.12 docker images
• Not available in alpine3.13 docker images
• Not available in alpine3.14 docker images
• Not available in alpine3.15 docker images
parallel Requires images with PHP compiled with thread-safety enabled (zts)
parle Not available in jessie docker images
pdo_sqlsrv Not available in ARM architectures
pthreads Requires images with PHP compiled with thread-safety enabled (zts)
saxon Not available in alpine docker images
simdjson • Not available in jessie docker images
• Not available in stretch docker images
sodium Not available in jessie docker images
sqlsrv • Not available in 7.1-alpine3.9 docker images
• Not available in 7.1-alpine3.10 docker images
• Not available in ARM architectures
vips • Not available in alpine3.9 docker images
• Not available in jessie docker images
Docker
1
https://gitee.com/xiaoyucc521/dnmp.git
git@gitee.com:xiaoyucc521/dnmp.git
xiaoyucc521
dnmp
dnmp
main

搜索帮助