php-pgsql-raw.dockerfile 799 B

123456789101112131415161718192021222324
  1. FROM ubuntu:18.10
  2. ARG DEBIAN_FRONTEND=noninteractive
  3. RUN apt 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 install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-pgsql > /dev/null
  7. COPY deploy/conf/* /etc/php/7.3/fpm/
  8. ADD ./ /php
  9. WORKDIR /php
  10. RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" dbraw.php
  11. RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" fortune.php
  12. RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" updateraw.php
  13. RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
  14. RUN chmod -R 777 /php
  15. CMD service php7.3-fpm start && \
  16. nginx -c /php/deploy/nginx7.conf -g "daemon off;"