These images are based on the official PHP image.
These images install php extensions using Easy installation of PHP extensions in official PHP Docker images
Default nginx port: 8080
Default fpm port: 9000
- 8.4 - aronpc/php:8.4-fpm, aronpc/php:8.4-nginx
- 8.3, latest - aronpc/php:8.3-fpm, aronpc/php:latest-fpm, aronpc/php:8.3-nginx, aronpc/php:latest-nginx
- 8.2 - aronpc/php:8.2-fpm, aronpc/php:8.2-nginx
- 8.1 - aronpc/php:8.1-fpm, aronpc/php:8.1-nginx
- 8.0 - aronpc/php:8.0-fpm, aronpc/php:8.0-nginx
- 7.4 - aronpc/php:7.4-fpm, aronpc/php:7.4-nginx
- 7.2 - aronpc/php:7.2-fpm, aronpc/php:7.2-nginx
- 7.1 - aronpc/php:7.1-fpm, aronpc/php:7.1-nginx
- 7.0 - aronpc/php:7.0-fpm, aronpc/php:7.0-nginx
- 5.6 - aronpc/php:5.6-fpm, aronpc/php:5.6-nginx
| Extensão | 5.6 | 7.0 | 7.1 | 7.2 | 7.3 | 7.4 | 8.0 | 8.1 | 8.2 | 8.3 | 8.4 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| amqp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| apcu | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| apcu_bc | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| ast | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| bcmath | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| bitset | |||||||||||
| blackfire | |||||||||||
| bz2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| calendar | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| cassandra | |||||||||||
| cmark | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| csv | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| dba | |||||||||||
| ddtrace | |||||||||||
| decimal | |||||||||||
| ds | |||||||||||
| enchant | |||||||||||
| ev | |||||||||||
| event | |||||||||||
| excimer | |||||||||||
| exif | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ffi | |||||||||||
| 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 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| pq | |||||||||||
| propro | |||||||||||
| protobuf | |||||||||||
| pspell | |||||||||||
| pthreads | ✓ | ✓ | |||||||||
| raphf | |||||||||||
| rdkafka | |||||||||||
| recode | |||||||||||
| redis | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| relay | |||||||||||
| shmop | |||||||||||
| simdjson | |||||||||||
| smbclient | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| snappy | |||||||||||
| snmp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| soap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sockets | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sodium | ✓ | ✓ | ✓ | ||||||||
| solr | |||||||||||
| sourceguardian | |||||||||||
| spx | |||||||||||
| sqlsrv | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| ssh2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| stomp | |||||||||||
| swoole | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sybase_ct | ✓ | ||||||||||
| sysvmsg | |||||||||||
| sysvsem | |||||||||||
| sysvshm | |||||||||||
| tensor | ✓ | ✓ | ✓ | ✓ | |||||||
| tidy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| timezonedb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| uopz | |||||||||||
| uploadprogress | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| uuid | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| vips | |||||||||||
| wddx | |||||||||||
| xdebug | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| xdiff | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xhprof | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xlswriter | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| xmldiff | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xmlrpc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xsl | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| yac | |||||||||||
| yaml | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| yar | |||||||||||
| zephir_parser | |||||||||||
| zip | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| zmq | |||||||||||
| zookeeper | |||||||||||
| zstd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Example with CLI:
docker run -it --rm -v "$PWD":/app aronpc/php:latest-fpm phpversion: '3'
services:
web:
image: aronpc/php:latest-nginx
working_dir: /app
volumes:
- ./:/appalias d-php="_php"
alias d-composer="_composer"
# using password and group files
# --volume /etc/passwd:/etc/passwd:ro
# --volume /etc/group:/etc/group:ro
# Set current user and group (solve permissions)
# --user $UID:$GID
# setting ssh agent to container (using 1password on example)
# --volume $HOME/.1password/agent.sock:/ssh-auth.sock
# --env SSH_AUTH_SOCK=/ssh-auth.sock
# mounting current dir as home of container and set workdir
# --volume $PWD:$PWD
# -w $PWD
# pass $argv to use console command
_php(){
docker run --rm --interactive --tty \
--volume /etc/passwd:/etc/passwd:ro \
--volume /etc/group:/etc/group:ro \
--user $UID:$GID \
--volume $PWD:$PWD \
-w $PWD\
aronpc/php:latest-fpm php $argv
}
_composer(){
docker run --rm --interactive --tty \
--volume /etc/passwd:/etc/passwd:ro \
--volume /etc/group:/etc/group:ro \
--user $UID:$GID \
--volume $PWD:$PWD \
-w $PWD\
aronpc/php:latest-fpm composer $argv
}