2022-02-28 21:07:12 +01:00
|
|
|
FROM php:8.1.3-fpm-buster
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2022-03-06 02:55:22 +01:00
|
|
|
RUN groupadd -g 1000 runner
|
|
|
|
RUN useradd -u 1000 -g 1000 -d /app -s /bin/bash runner
|
2022-02-28 21:07:12 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2022-03-06 02:55:22 +01:00
|
|
|
USER runner
|