zend.dockerfile 874 B

1234567891011121314151617181920212223242526
  1. FROM ubuntu:19.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 php7.4 php7.4-common php7.4-cli php7.4-fpm php7.4-mysql > /dev/null
  7. RUN apt-get install -yqq php7.4-xml php7.4-mbstring > /dev/null
  8. RUN apt-get install -yqq composer > /dev/null
  9. COPY deploy/conf/* /etc/php/7.4/fpm/
  10. ADD ./ /zend
  11. WORKDIR /zend
  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 mkdir -p data/cache
  14. RUN chmod 777 data/cache
  15. RUN composer install --optimize-autoloader --classmap-authoritative --quiet --no-dev
  16. CMD service php7.4-fpm start && \
  17. nginx -c /zend/deploy/nginx.conf -g "daemon off;"