Sign inSign up

chrishyze/extended-php

By chrishyze

•Updated over 3 years ago

PHP images with pre-build extensions.

Image
0

6.8K

chrishyze/extended-php repository overview

⁠Extended PHP

Github repository⁠

This respository provide PHP images with pre-build extensions.
You can build you own image base on these images for time-saving.

⁠Features

  • Based on official PHP image⁠, include security support versions⁠ and extra PHP 7.4
  • Supported architectures:
    amd64, arm64v8, arm32v7
  • Installed extensions:
    bcmath, event, exif, gd, gnupg, grpc, imagick, memcached, mongodb, mysqli, opcache, pcntl, pdo_mysql, pdo_pgsql, pgsql, protobuf, redis, sockets, ssh2, swoole, xdebug, zip, zookeeper, zstd
  • Extensions are installed by mlocati/docker-php-extension-installer⁠
  • All installed extensions are disabled by default, feel free to enable them in needed

⁠Build status

Image TagPlatformStatus
8.2-fpmamd64, arm64v88.2-fpm
8.2-fpm-alpineamd64, arm64v8, arm32v78.2-fpm-alpine
8.2-cliamd64, arm64v88.2-cli
8.2-cli-alpineamd64, arm64v8, arm32v78.2-cli-alpine
8.1-fpmamd64, arm64v88.1-fpm
8.1-fpm-alpineamd64, arm64v8, arm32v78.1-fpm-alpine
8.1-cliamd64, arm64v88.1-cli
8.1-cli-alpineamd64, arm64v8, arm32v78.1-cli-alpine
8.0-fpmamd64, arm64v8, arm32v78.0-fpm
8.0-fpm-alpineamd64, arm64v8, arm32v78.0-fpm-alpine
8.0-cliamd64, arm64v8, arm32v78.0-cli
8.0-cli-alpineamd64, arm64v8, arm32v78.0-cli-alpine
7.4-fpmamd64, arm64v8, arm32v77.4-fpm
7.4-fpm-alpineamd64, arm64v8, arm32v77.4-fpm-alpine
7.4-cliamd64, arm64v8, arm32v77.4-cli
7.4-cli-alpineamd64, arm64v8, arm32v77.4-cli-alpine

⁠How to enable extension

Just use /usr/local/etc/php/php.ini to configure the extension.

echo 'zend_extension=xdebug' >> /usr/local/etc/php/php.ini

Or add an independent ini file to /usr/local/etc/php/conf.d/ directory.

echo 'zend_extension=xdebug' > /usr/local/etc/php/conf.d/xdebug.ini

Don't forget to reload the configuration if you are using php-fpm.

Since you are using Docker, you can also prepare a directory contains configure files and then mount the directory.

docker run -v /path/to/config/directory:/usr/local/etc/php ...

⁠Why not install all available extensions?

In modern development, you don't need to use those outdated extensions in most cases.
Some extensions are no longer maintained, and some don't even support PHP 8.
There are alternative libraries written in pure PHP you can choose. For example, use the php-amqplib⁠ library instead of php-amqp⁠.
If you really want a specific extension which is not installed in the image, you can just install it using mlocati/docker-php-extension-installer by your self.

⁠License

The MIT License

Tag summary

Content type

Image

Digest

sha256:8ea63ef58…

Size

95.1 MB

Last updated

over 3 years ago

docker pull chrishyze/extended-php:8.0-fpm-alpine