Docker + nginx + MySQL + PHP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.1 KiB

1 year ago
FROM php:7.4-fpm-alpine3.13
1 year ago
1 year ago
# 安装gd扩展和其他扩展的依赖
1 year ago
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 \
1 year ago
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
1 year ago
&& 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 \
1 year ago
&& yes | pecl install imagick-3.7.0 \
1 year ago
&& docker-php-ext-enable imagick \
1 year ago
&& pecl install redis-6.0.2 \
1 year ago
&& no | docker-php-ext-enable redis \
1 year ago
&& apk del freetype-dev libjpeg-turbo-dev libpng-dev libxml2-dev libxslt-dev autoconf g++ make imagemagick-dev \
&& rm -rf /var/cache/apk/* \
1 year ago
&& mkdir -p /usr/local/log \
&& sed -i 's/9000/127.0.0.1:9074/' /usr/local/etc/php-fpm.d/zz-docker.conf
1 year ago
1 year ago
1 year ago
# 复制自定义PHP-FPM配置文件到容器
COPY ./www.conf /usr/local/etc/php-fpm.d/www.conf
1 year ago
1 year ago
# 添加自定义的PHP配置文件
1 year ago
COPY ./php.ini $PHP_INI_DIR/conf.d/
1 year ago
EXPOSE 9074