Skip to content

Commit 9592d71

Browse files
authored
Distroless fix (#6)
1 parent df7d12b commit 9592d71

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

build/Dockerfile.distroless

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,15 @@ RUN \
173173
# https://github.com/arachnys/athenapdf/commit/ba25a8d80a25d08d58865519c4cd8756dc9a336d.
174174
COPY build/fonts.conf /etc/fonts/conf.d/100-gotenberg.conf
175175

176+
# ----------------------------------------------
177+
# Python copy stage
178+
# ----------------------------------------------
179+
FROM public.ecr.aws/j9h1x6x3/distroless-python:latest AS python-source
180+
176181
# ----------------------------------------------
177182
# Final stage
178183
# ----------------------------------------------
179-
FROM public.ecr.aws/j9h1x6x3/distroless-python:latest AS base
184+
FROM gcr.io/distroless/cc-debian12:latest AS base
180185

181186
# Set platform-specific CHIPSET_ARCH
182187
FROM base AS base-amd64
@@ -190,6 +195,11 @@ ARG CHIPSET_ARCH=aarch64-linux-gnu
190195
ARG TARGETARCH
191196
FROM base-${TARGETARCH}
192197

198+
# Required for unoconverter
199+
COPY --from=python-source /usr/local/bin/python /usr/bin/python
200+
COPY --from=python-source /usr/local/bin/python /usr/bin/python3
201+
COPY --from=python-source /usr/local/bin/python /usr/bin/python3.11
202+
193203
ENV PYTHONPATH="/usr/local/lib/python3.11/dist-packages:"
194204

195205
# LibreOffice dependencies

0 commit comments

Comments
 (0)