php-unit.dockerfile 385 B

12345678910111213
  1. FROM nginx/unit:1.27.0-php8.1
  2. ADD . /php
  3. WORKDIR /php
  4. RUN docker-php-ext-install pdo_mysql opcache > /dev/null
  5. RUN if [ $(nproc) = 2 ]; then sed -i "s|\"processes\": 84,|\"processes\": 64,|g" /php/deploy/nginx-unit.json ; fi;
  6. COPY deploy/nginx-unit.json /docker-entrypoint.d/nginx-unit.json
  7. EXPOSE 8080
  8. CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]