Browse Source

优化

main
xiaoz 1 year ago
parent
commit
bca424956d
  1. 17
      php74/Dockerfile

17
php74/Dockerfile

@ -3,19 +3,16 @@ FROM php:7.4-fpm-alpine3.13
# 安装gd扩展和其他扩展的依赖 # 安装gd扩展和其他扩展的依赖
RUN apk add --no-cache autoconf g++ make libxslt libxslt-dev libxml2 libxml2-dev icu-dev freetype-dev libjpeg-turbo-dev libpng-dev libzip-dev libpng libjpeg-turbo gettext-dev \ RUN apk add --no-cache autoconf g++ make libxslt libxslt-dev libxml2 libxml2-dev icu-dev freetype-dev libjpeg-turbo-dev libpng-dev libzip-dev libpng libjpeg-turbo gettext-dev \
&& docker-php-ext-configure gd --with-jpeg --with-freetype \ && docker-php-ext-configure gd --with-jpeg --with-freetype \
&& docker-php-ext-install gd bcmath exif gettext intl mysqli pcntl pdo_mysql shmop soap sockets sysvsem xmlrpc xsl zip opcache && docker-php-ext-install gd bcmath exif gettext intl mysqli pcntl pdo_mysql shmop soap sockets sysvsem xmlrpc xsl zip opcache \
&& apk add --no-cache imagemagick imagemagick-dev \
# 安装 ImageMagick 和 imagick && yes | pecl install imagick \
RUN apk add --no-cache imagemagick imagemagick-dev \
&& yes | pecl install imagick \
&& docker-php-ext-enable imagick \ && docker-php-ext-enable imagick \
&& pecl install redis \ && pecl install redis \
&& no | docker-php-ext-enable redis && no | docker-php-ext-enable redis \
&& apk del freetype-dev libjpeg-turbo-dev libpng-dev icu-dev libxml2-dev libxslt-dev autoconf g++ make imagemagick-dev \
# 删除不再需要的依赖
RUN apk del freetype-dev libjpeg-turbo-dev libpng-dev icu-dev libxml2-dev libxslt-dev autoconf g++ make \
&& rm -rf /var/cache/apk/* && rm -rf /var/cache/apk/*
# 复制自定义PHP-FPM配置文件到容器 # 复制自定义PHP-FPM配置文件到容器
COPY ./www.conf /usr/local/etc/php-fpm.d/www.conf COPY ./www.conf /usr/local/etc/php-fpm.d/www.conf

Loading…
Cancel
Save