nette.dockerfile 851 B

123456789101112131415161718192021222324252627
  1. FROM ubuntu:24.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 install -yqq nginx git unzip \
  6. php8.4-fpm php8.4-mysql php8.4-xml php8.4-mbstring php8.4-intl php8.4-dev php8.4-curl > /dev/null
  7. COPY deploy/conf/* /etc/php/8.4/fpm/
  8. WORKDIR /nette
  9. COPY --link . .
  10. #ENV NETTE_DIR="/nette/src"
  11. COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
  12. RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
  13. RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi;
  14. RUN chmod -R 777 /nette
  15. EXPOSE 8080
  16. CMD service php8.4-fpm start && \
  17. nginx -c /nette/deploy/nginx.conf 2>&1 > /dev/stderr