mixphp.dockerfile 898 B

1234567891011121314151617181920212223242526
  1. FROM ubuntu:20.04
  2. ARG DEBIAN_FRONTEND=noninteractive
  3. RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
  4. RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
  5. 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
  6. COPY deploy/conf/* /etc/php/8.1/fpm/
  7. 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;
  8. ADD ./ /mixphp
  9. WORKDIR /mixphp
  10. RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  11. RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null
  12. RUN composer dumpautoload -o
  13. RUN mkdir -p /mixphp/runtime/logs
  14. RUN chmod -R 777 /mixphp/runtime/logs
  15. EXPOSE 8080
  16. CMD service php8.1-fpm start && \
  17. nginx -c /mixphp/deploy/nginx.conf