|
|
@ -1,10 +1,17 @@ |
|
|
|
FROM php:7.4-fpm-alpine |
|
|
|
FROM php:7.4-fpm-alpine |
|
|
|
|
|
|
|
|
|
|
|
# 安装依赖并配置安装扩展 |
|
|
|
# 安装gd扩展和其他扩展的依赖 |
|
|
|
RUN apk add --no-cache freetype-dev libjpeg-turbo-dev libpng-dev libzip-dev libpng libjpeg-turbo \ |
|
|
|
RUN apk add --no-cache freetype-dev libjpeg-turbo-dev libpng-dev libzip-dev libpng libjpeg-turbo \ |
|
|
|
&& docker-php-ext-configure gd --with-jpeg --with-freetype \ |
|
|
|
&& docker-php-ext-configure gd --with-jpeg --with-freetype \ |
|
|
|
&& docker-php-ext-install bcmath exif gd gettext imagick intl mysqli pcntl pdo_mysql redis shmop soap sockets sysvsem xmlrpc xsl zip opcache \ |
|
|
|
&& docker-php-ext-install gd bcmath exif gettext intl mysqli pcntl pdo_mysql redis shmop soap sockets sysvsem xmlrpc xsl zip opcache |
|
|
|
&& apk del libpng-dev libjpeg-turbo-dev \ |
|
|
|
|
|
|
|
|
|
|
|
# 安装 ImageMagick 和 imagick |
|
|
|
|
|
|
|
RUN apk add --no-cache imagemagick imagemagick-dev \ |
|
|
|
|
|
|
|
&& pecl install imagick \ |
|
|
|
|
|
|
|
&& docker-php-ext-enable imagick |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 删除不再需要的依赖 |
|
|
|
|
|
|
|
RUN apk del freetype-dev libjpeg-turbo-dev libpng-dev \ |
|
|
|
&& rm -rf /var/cache/apk/* |
|
|
|
&& rm -rf /var/cache/apk/* |
|
|
|
|
|
|
|
|
|
|
|
# 复制自定义PHP-FPM配置文件到容器 |
|
|
|
# 复制自定义PHP-FPM配置文件到容器 |
|
|
|