1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-04 11:58:05 +01:00
vichan/docker/php/Dockerfile
2024-04-16 22:32:41 +02:00

48 lines
1.3 KiB
Docker

# Based on https://github.com/dead-guru/devichan/blob/master/php-fpm/Dockerfile
FROM composer AS composer
FROM php:8.1-fpm-bullseye
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
zlib1g-dev libicu-dev g++ \
libjpeg62-turbo-dev \
libzip-dev \
libpng-dev \
libwebp-dev \
libfreetype6-dev \
libxml2-dev \
git \
zip \
ffmpeg \
libonig-dev \
unzip \
libcurl4-openssl-dev \
libmagickwand-dev \
gifsicle \
graphicsmagick \
gettext \
imagemagick \
locales locales-all \
libmagickwand-dev \
libmcrypt-dev \
&& docker-php-ext-configure gd \
--with-webp=/usr/include/webp \
--with-jpeg=/usr/include \
--with-freetype=/usr/include/freetype2/ \
&& pecl install redis \
&& pecl install imagick \
&& pecl install -o -f igbinary \
&& docker-php-ext-install gd zip opcache intl pdo pdo_mysql mysqli bcmath gettext iconv mbstring curl \
&& docker-php-ext-enable igbinary redis imagick
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY . /code
RUN /code/docker/common-setup.sh \
&& ln -s /code/composer.json /code/composer.lock /var/www/ \
&& cd /var/www && composer install
WORKDIR "/var/www"
CMD [ "php-fpm" ]
EXPOSE 9000