From 60988997fb9ddf1cf589c4712ef0e5bf302ac0f5 Mon Sep 17 00:00:00 2001 From: Toan Tran Quoc <46007489+CptDaimox@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:54:45 +0100 Subject: [PATCH 1/2] Add PHP 8.3 FPM Runtime --- Docker.php-83-fpm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Docker.php-83-fpm diff --git a/Docker.php-83-fpm b/Docker.php-83-fpm new file mode 100644 index 0000000..5ef2f0e --- /dev/null +++ b/Docker.php-83-fpm @@ -0,0 +1,33 @@ +FROM bref/php-83-fpm +# binutils is needed for "strip" command +RUN yum install \ + tar \ + gzip \ + libdbusmenu.x86_64 \ + libdbusmenu-gtk2.x86_64 \ + libSM.x86_64 \ + xorg-x11-fonts-* \ + google-noto-sans-cjk-fonts.noarch \ + binutils.x86_64 \ + -y && \ + yum clean all + +# Download Libreoffice +RUN set -xo pipefail && \ + curl "https://ftp.halifax.rwth-aachen.de/tdf/libreoffice/stable/7.6.4/rpm/x86_64/LibreOffice_7.6.4_Linux_x86-64_rpm.tar.gz" | tar -xz + +# Install LibreOffice +RUN cd LibreOffice_7.6.4.1_Linux_x86-64_rpm/RPMS && \ + yum install *.rpm -y && \ + rm -rf /var/task/LibreOffice_7.6.4.1* && \ + cd /opt/libreoffice7.6/ && \ + strip ./**/* || true + +ENV HOME=/tmp +# Trigger dummy run to generate bootstrap files to improve cold start performance +RUN mkdir /var/task/tmp && touch /var/task/tmp/test.docx \ + && cd /var/task/tmp \ + && libreoffice7.6 --headless --invisible --nodefault --view \ + --nolockcheck --nologo --norestore --convert-to pdf \ + --outdir /var/task/tmp /var/task/tmp/test.docx \ + && rm /var/task/tmp/* && rmdir /var/task/tmp From a3539a83124b01606d912919cb0eab09bb3dde56 Mon Sep 17 00:00:00 2001 From: Toan Tran Quoc <46007489+CptDaimox@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:56:08 +0100 Subject: [PATCH 2/2] Rename Dockerfile --- Docker.php-83-fpm => Dockerfile.php-83-fpm | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Docker.php-83-fpm => Dockerfile.php-83-fpm (100%) diff --git a/Docker.php-83-fpm b/Dockerfile.php-83-fpm similarity index 100% rename from Docker.php-83-fpm rename to Dockerfile.php-83-fpm