xrg.es/docker/Dockerfile.php

23 lines
831 B
PHP
Raw Normal View History

2022-01-11 13:22:20 +00:00
FROM php:8.1-fpm-alpine
2022-01-10 10:51:12 +00:00
2022-01-11 13:22:20 +00:00
RUN apk add --no-cache curl git
2022-01-10 10:51:12 +00:00
# https://github.com/mlocati/docker-php-extension-installer
# https://github.com/mlocati/docker-php-extension-installer#special-requirements
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 install-php-extensions opcache redis timezonedb
2022-01-11 13:22:20 +00:00
RUN rm -rf /var/cache/apk/*
2022-01-10 10:51:12 +00:00
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
2022-01-10 11:12:17 +00:00
COPY docker/zz-custom-php.ini "$PHP_INI_DIR/conf.d/"
COPY docker/zz-custom-phpfpm.conf /usr/local/etc/php-fpm.d/zz-docker.conf
2022-01-10 10:51:12 +00:00
2022-01-10 11:12:17 +00:00
COPY backend /var/www/backend
2022-01-11 12:36:29 +00:00
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
RUN chown -R www-data:www-data /var/www