flight.dockerfile 842 B

12345678910111213141516171819202122232425262728
  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 update -yqq > /dev/null && \
  6. apt-get install -yqq nginx git unzip php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql > /dev/null
  7. COPY deploy/conf/* /etc/php/8.4/fpm/
  8. WORKDIR /flight
  9. COPY --link . .
  10. ENV FLIGHT_DIR="/flight/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 /flight
  15. EXPOSE 8080
  16. CMD service php8.4-fpm start && \
  17. nginx -c /flight/deploy/nginx.conf