-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathDockerfile.python3_13-x86_64
More file actions
38 lines (31 loc) · 1.68 KB
/
Dockerfile.python3_13-x86_64
File metadata and controls
38 lines (31 loc) · 1.68 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
36
37
38
FROM public.ecr.aws/lambda/python:3.13-x86_64
ARG LIBREOFFICE_CHANNEL=stable
ARG LIBREOFFICE_VERSION=26.2.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_series="${LIBREOFFICE_VERSION%.*}" \
&& 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}" \
&& libre_rpm_root="$(find . -maxdepth 1 -type d -name 'LibreOffice_*_Linux_x86-64_rpm' -print -quit)" \
&& test -n "${libre_rpm_root}" \
&& rpm -Uvh "${libre_rpm_root}/RPMS/"*.rpm \
&& ln -sf "/usr/bin/libreoffice${libre_series}" /usr/bin/libreoffice \
&& 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 \
&& libreoffice --headless --invisible --nodefault --view \
--nolockcheck --nologo --norestore --convert-to pdf \
--outdir /tmp /tmp/test.txt \
&& rm /tmp/test.*