mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
Enable opcache
This commit is contained in:
44
debian/Dockerfile
vendored
44
debian/Dockerfile
vendored
@@ -1,4 +1,5 @@
|
|||||||
FROM php:8.2-fpm AS base
|
FROM php:8.2-fpm AS base
|
||||||
|
ARG saxon=12.3
|
||||||
|
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
@@ -12,6 +13,34 @@ RUN apt-get update && apt-get install -y \
|
|||||||
gosu \
|
gosu \
|
||||||
default-mysql-client \
|
default-mysql-client \
|
||||||
supervisor \
|
supervisor \
|
||||||
|
fonts-liberation \
|
||||||
|
libasound2 \
|
||||||
|
libatk-bridge2.0-0 \
|
||||||
|
libatk1.0-0 \
|
||||||
|
libatspi2.0-0 \
|
||||||
|
libcups2 \
|
||||||
|
libdbus-1-3 \
|
||||||
|
libdrm2 \
|
||||||
|
libgbm1 \
|
||||||
|
libgtk-3-0 \
|
||||||
|
libnspr4 \
|
||||||
|
libnss3 \
|
||||||
|
libwayland-client0 \
|
||||||
|
libxcomposite1 \
|
||||||
|
libxdamage1 \
|
||||||
|
libxfixes3 \
|
||||||
|
libxkbcommon0 \
|
||||||
|
libxrandr2 \
|
||||||
|
xdg-utils \
|
||||||
|
wget \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Chrome
|
||||||
|
RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y ./google-chrome-stable_current_amd64.deb \
|
||||||
|
&& rm google-chrome-stable_current_amd64.deb \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
@@ -40,6 +69,21 @@ RUN install-php-extensions \
|
|||||||
COPY php/php.ini /usr/local/etc/php/conf.d/app.ini
|
COPY php/php.ini /usr/local/etc/php/conf.d/app.ini
|
||||||
COPY php/php-fpm.conf /usr/local/etc/php-fpm.d/www.conf
|
COPY php/php-fpm.conf /usr/local/etc/php-fpm.d/www.conf
|
||||||
|
|
||||||
|
# Configure Saxon
|
||||||
|
WORKDIR /opt
|
||||||
|
|
||||||
|
## fetch
|
||||||
|
RUN curl https://www.saxonica.com/download/libsaxon-HEC-linux-v${saxon}.zip --output saxon.zip
|
||||||
|
RUN unzip saxon.zip -d saxon
|
||||||
|
RUN cp saxon/libsaxon-HEC-linux-v${saxon}/libs/nix/libsaxon-hec-${saxon}.so /usr/lib/
|
||||||
|
WORKDIR /opt/saxon/libsaxon-HEC-linux-v${saxon}/Saxon.C.API
|
||||||
|
RUN phpize
|
||||||
|
RUN ./configure --enable-saxon
|
||||||
|
RUN make
|
||||||
|
RUN ls -al
|
||||||
|
RUN make install
|
||||||
|
RUN echo 'extension=saxon.so' > "/usr/local/etc/php/conf.d/app.ini"
|
||||||
|
|
||||||
# Copy scripts
|
# Copy scripts
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
|
|||||||
21
debian/php/php.ini
vendored
21
debian/php/php.ini
vendored
@@ -0,0 +1,21 @@
|
|||||||
|
session.auto_start = Off
|
||||||
|
short_open_tag = Off
|
||||||
|
|
||||||
|
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED
|
||||||
|
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.preload=/var/www/html/preload.php
|
||||||
|
opcache.preload_user=www-data
|
||||||
|
|
||||||
|
; ; The OPcache shared memory storage size.
|
||||||
|
opcache.max_accelerated_files=300000
|
||||||
|
opcache.validate_timestamps=1
|
||||||
|
opcache.revalidate_freq=30
|
||||||
|
opcache.jit_buffer_size=256M
|
||||||
|
opcache.jit=1205
|
||||||
|
opcache.memory_consumption=1024M
|
||||||
|
|
||||||
|
|
||||||
|
post_max_size = 60M
|
||||||
|
upload_max_filesize = 50M
|
||||||
|
memory_limit=512M
|
||||||
|
|||||||
Reference in New Issue
Block a user