Skip to content

Commit

Permalink
feat: php 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkcup committed Dec 18, 2021
1 parent d6765b9 commit 9dec1c6
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions php/8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM php:8.1

RUN curl -o /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar \
&& chmod +x /usr/local/bin/composer

# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
cron \
git \
icu-devtools \
jq \
libfreetype6-dev libicu-dev libjpeg62-turbo-dev libpng-dev librsvg2-bin libsasl2-dev libssl-dev libwebp-dev libxpm-dev libzip-dev \
unzip \
vim \
zlib1g-dev \
&& apt-get clean \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini \
&& pecl install --configureoptions='enable-redis-igbinary="yes" enable-redis-lzf="yes" enable-redis-zstd="yes"' igbinary zstd redis \
&& pecl clear-cache \
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp --with-xpm \
&& docker-php-ext-install gd intl pdo_mysql pdo_pgsql zip \
&& docker-php-ext-enable igbinary opcache redis xdebug zstd

RUN composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ \
&& sed -i 's/[a-z]\+.debian.org/mirrors.cloud.tencent.com/g' /etc/apt/sources.list

0 comments on commit 9dec1c6

Please sign in to comment.