FROM ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq && apt-get install -yqq git unzip wget curl build-essential nginx php8.1-fpm php8.1-mysql php8.1-dev > /dev/null COPY deploy/conf/* /etc/php/8.1/fpm/ RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.1/fpm/php-fpm.conf ; fi; ADD ./ /mixphp WORKDIR /mixphp RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null RUN composer dumpautoload -o RUN mkdir -p /mixphp/runtime/logs RUN chmod -R 777 /mixphp/runtime/logs EXPOSE 8080 CMD service php8.1-fpm start && \ nginx -c /mixphp/deploy/nginx.conf