Reputation: 211
I am setting up very basic Docker container for a PHP and Zend framework project. I am using official Docker image php:fpm-alpine
. Container is running successfully and I am able to see my application. In order for Zend to work I need PHP intl
extention. When I add RUN docker-php-ext-install intl
command in DockerFile
extention is not installed successfully.
DockerFile code
FROM php:fpm-alpine
WORKDIR /usr/share/nginx/html
RUN docker-php-ext-install mysqli pdo pdo_mysql intl
Any help or recommendation is much appreciated. Thanks in advance.
Upvotes: 20
Views: 18068
Reputation: 581
The installation of intl
extension is failing because a dependency is missing for it. Please update your Dockerfile with following and it should work.
FROM php:fpm-alpine
WORKDIR /usr/share/nginx/html
RUN apk add icu-dev
RUN docker-php-ext-install mysqli pdo pdo_mysql
RUN docker-php-ext-configure intl && docker-php-ext-install intl
Upvotes: 47