cakephp.dockerfile 855 B

123456789101112131415161718192021222324252627
  1. FROM ubuntu:20.10
  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 > /dev/null && \
  6. apt-get install -yqq nginx git unzip \
  7. php8.0-fpm php8.0-mysql php8.0-xml php8.0-mbstring php8.0-intl > /dev/null
  8. RUN apt-get install -yqq composer > /dev/null
  9. COPY deploy/conf/* /etc/php/8.0/fpm/
  10. COPY deploy/conf/* /etc/php/8.0/cli/
  11. ADD ./ /cakephp
  12. WORKDIR /cakephp
  13. RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.0/fpm/php-fpm.conf ; fi;
  14. RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
  15. RUN chmod -R 777 /cakephp
  16. CMD service php8.0-fpm start && \
  17. nginx -c /cakephp/deploy/nginx.conf