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