-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathDockerfile.python3_14-x86_64
More file actions
35 lines (28 loc) · 1.48 KB
/
Dockerfile.python3_14-x86_64
File metadata and controls
35 lines (28 loc) · 1.48 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 public.ecr.aws/lambda/python:3.14-x86_64
ARG LIBREOFFICE_CHANNEL=stable
ARG LIBREOFFICE_VERSION=25.8.4
ARG LIBREOFFICE_BUILD=25.8.4.2
ARG LIBREOFFICE_DOWNLOAD_BASE=https://download.documentfoundation.org/libreoffice
ENV PATH=/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin
# Configure linker to correctly point to libraries
ENV LD_LIBRARY_PATH="/usr/lib:/usr/lib64"
RUN dnf install -y xorg-x11-fonts-* libSM.x86_64 libXinerama-devel google-noto-sans-cjk-fonts binutils tar gzip xz \
openssl nss-tools dbus-libs cups-libs libxslt && dnf clean all
RUN cp /lib64/libssl.so.3 /lib64/libssl3.so
RUN set -eux \
&& libre_tmp="$(mktemp -d -t libreoffice-XXXXXXXX)" \
&& cd "${libre_tmp}" \
&& libre_archive="LibreOffice_${LIBREOFFICE_VERSION}_Linux_x86-64_rpm.tar.gz" \
&& libre_repo="${LIBREOFFICE_DOWNLOAD_BASE}/${LIBREOFFICE_CHANNEL}/${LIBREOFFICE_VERSION}/rpm/x86_64" \
&& curl --fail --show-error --location --retry 3 --retry-delay 2 -o "${libre_archive}" "${libre_repo}/${libre_archive}" \
&& tar -xzf "${libre_archive}" \
&& rpm -Uvh "LibreOffice_${LIBREOFFICE_BUILD}_Linux_x86-64_rpm/RPMS/"*.rpm \
&& rm -rf "${libre_tmp}"
ENV HOME=/tmp
# Trigger dummy run to generate bootstrap files to improve cold start performance
RUN touch /tmp/test.txt \
&& cd /tmp \
&& libreoffice25.8 --headless --invisible --nodefault --view \
--nolockcheck --nologo --norestore --convert-to pdf \
--outdir /tmp /tmp/test.txt \
&& rm /tmp/test.*