Skip to content

Commit df2f267

Browse files
committed
Php gd ext support
1 parent c2f0318 commit df2f267

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Dockerfile.php

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
FROM php:7.2-fpm
2+
Run echo "nameserver 223.5.5.5" >> /etc/resolv.conf \
3+
&& echo "nameserver 223.6.6.6" >> /etc/resolve.conf \
4+
&& apt-get update \
5+
&& apt-get install -y \
6+
libfreetype6-dev \
7+
libjpeg62-turbo-dev \
8+
libpng-dev \
29

3-
Run ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
4-
&& echo "Asia/Shanghai" > /etc/timezone \
5-
&& docker-php-ext-install mysqli pdo pdo_mysql \
6-
&& pecl install redis \
10+
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
11+
&& docker-php-ext-install -j$(nproc) gd \
12+
&& docker-php-ext-install mysqli pdo_mysql \
713
&& pecl install swoole \
8-
&& docker-php-ext-enable redis swoole
14+
&& pecl install redis \
15+
&& docker-php-ext-enable swoole redis

0 commit comments

Comments
 (0)