xrg.es/docker/Dockerfile

31 lines
1.2 KiB
Docker
Raw Permalink Normal View History

2021-12-20 00:08:53 +00:00
# syntax=docker/dockerfile:1
2022-01-09 11:08:42 +00:00
FROM php:8.1-fpm-buster
2021-12-20 00:08:53 +00:00
RUN apt update && apt install -y git wget
# https://github.com/mlocati/docker-php-extension-installer
2022-01-09 11:08:42 +00:00
# https://github.com/mlocati/docker-php-extension-installer#special-requirements
2021-12-20 00:08:53 +00:00
RUN curl -sSLf -o /usr/local/bin/install-php-extensions \
https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
chmod +x /usr/local/bin/install-php-extensions
RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/main/web/installer -O - | php -- && \
chmod +x composer.phar && \
mv composer.phar /usr/local/bin/composer
RUN wget https://get.symfony.com/cli/installer -O - | bash && \
mv /root/.symfony/bin/symfony /usr/local/bin/symfony
RUN install-php-extensions apcu intl opcache redis timezonedb
RUN apt clean autoclean && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/*
2022-01-09 11:08:42 +00:00
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
RUN chown -R www-data:www-data /var/www
2021-12-20 00:08:53 +00:00
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
2022-01-09 11:08:42 +00:00
COPY zz-custom-php.ini "$PHP_INI_DIR/conf.d/"
COPY zz-custom-phpfpm.conf /usr/local/etc/php-fpm.d/zz-docker.conf