-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (31 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
35 lines (31 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM bref/php-83-fpm
# Copy the source code in the image
# COPY .. /var/task
# 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
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