compile php ext with all core
parent
2d023d0cd4
commit
ff6d36c498
|
@ -24,7 +24,7 @@ RUN pecl install apcu \
|
||||||
|
|
||||||
RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf \
|
RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf \
|
||||||
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
|
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
|
||||||
&& docker-php-ext-install \
|
&& docker-php-ext-install -j$(nproc) \
|
||||||
bz2 \
|
bz2 \
|
||||||
gd \
|
gd \
|
||||||
exif \
|
exif \
|
||||||
|
|
|
@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
RUN mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
|
RUN mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
|
||||||
|
|
||||||
RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf \
|
RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf \
|
||||||
&& docker-php-ext-install \
|
&& docker-php-ext-install -j$(nproc) \
|
||||||
bz2 \
|
bz2 \
|
||||||
gd \
|
gd \
|
||||||
exif \
|
exif \
|
||||||
|
|
|
@ -24,7 +24,7 @@ RUN pecl install apcu \
|
||||||
|
|
||||||
RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf \
|
RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf \
|
||||||
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
|
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
|
||||||
&& docker-php-ext-install \
|
&& docker-php-ext-install -j$(nproc) \
|
||||||
bz2 \
|
bz2 \
|
||||||
gd \
|
gd \
|
||||||
exif \
|
exif \
|
||||||
|
|
|
@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
RUN mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
|
RUN mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
|
||||||
|
|
||||||
RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf \
|
RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --enable-gd-native-ttf \
|
||||||
&& docker-php-ext-install \
|
&& docker-php-ext-install -j$(nproc) \
|
||||||
bz2 \
|
bz2 \
|
||||||
gd \
|
gd \
|
||||||
exif \
|
exif \
|
||||||
|
|
|
@ -92,7 +92,7 @@ Add this line to your Dockerfile:
|
||||||
|
|
||||||
### How to install more PHP extensions
|
### How to install more PHP extensions
|
||||||
|
|
||||||
We provide two convenient scripts named `docker-php-ext-configure` and `docker-php-ext-install`, you can use them to easily install PHP extension.
|
We provide two convenient scripts named `docker-php-ext-configure` and `docker-php-ext-install -j$(nproc)`, you can use them to easily install PHP extension.
|
||||||
|
|
||||||
For example, if you want to have a PHP-FPM image with `iconv`, `mcrypt` and `gd` extensions, you can inheriting the base image that you like, and write your own `Dockerfile` like this:
|
For example, if you want to have a PHP-FPM image with `iconv`, `mcrypt` and `gd` extensions, you can inheriting the base image that you like, and write your own `Dockerfile` like this:
|
||||||
|
|
||||||
|
@ -104,9 +104,9 @@ RUN apt-get update && apt-get install -y \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
libpng12-dev \
|
libpng12-dev \
|
||||||
&& docker-php-ext-install iconv mcrypt \
|
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
|
||||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||||
&& docker-php-ext-install gd
|
&& docker-php-ext-install -j$(nproc) gd
|
||||||
CMD ["php-fpm"]
|
CMD ["php-fpm"]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue