/docker-php-extensions

:whale: A Docker image that contains prebuilt PHP extensions

Primary LanguageDockerfileMIT LicenseMIT

docker-php-extensions

GitHub Docker Automated build Docker Cloud Build Status Docker Pulls

🐳 A Docker image that contains prebuilt PHP extensions.

Extensions

Usage

FROM php:7.4-cli-alpine

COPY --from=gaiaz/php-extensions:7.4-alpine \
    /apcu.so \
    /gd.so \
    /intl.so \
    /opcache.so \
    /pdo_mysql.so \
    /pdo_pgsql.so \
    /redis.so \
    /xdebug.so \
    /zip.so \
    /usr/local/lib/php/extensions/no-debug-non-zts-20190902/

RUN docker-php-ext-enable \
        apcu \
        opcache \
        pdo_mysql \
        redis \
        xdebug

RUN set -xe \
    && apk add --quiet --no-cache \
        libpng \
        libjpeg \
        freetype \
    && docker-php-ext-enable \
        gd

RUN set -xe \
    && apk add --quiet --no-cache \
        icu \
    && docker-php-ext-enable \
        intl

RUN set -xe \
    && apk add --quiet --no-cache \
        libpq \
    && docker-php-ext-enable \
        pdo_pgsql

RUN set -xe \
    && apk add --quiet --no-cache \
        libzip \
    && docker-php-ext-enable \
        zip

RUN php -m

License

MIT © Gaiaz Iusipov