adrema/.docker/php.Dockerfile

22 lines
718 B
Docker
Raw Normal View History

2022-02-28 21:07:12 +01:00
FROM php:8.1.3-fpm-buster
WORKDIR /app
RUN useradd -d /app -s /bin/bash runner
RUN sed -i 's/user = www-data/user = runner/' /usr/local/etc/php-fpm.d/www.conf
RUN sed -i 's/group = www-data/group = runner/' /usr/local/etc/php-fpm.d/www.conf
RUN apt-get clean && apt-get update && apt-get install -y apt-utils
RUN apt-get install -y libsodium-dev curl libpng-dev git zip
RUN docker-php-ext-install mysqli pdo pdo_mysql sodium bcmath exif gd pcntl
2022-03-04 01:56:52 +01:00
RUN echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/docker-php-ram-limit.ini
2022-02-28 21:07:12 +01:00
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN rm composer-setup.php