File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1+ # This is our strategy for getting a clean (from CVE perspective) base image for python-based services.
2+ # This mostly takes from https://github.com/alexdmoss/distroless-python
3+ # We need to build our own to be able to get new debian versions with fixes.
4+
5+ # Google periodically updates distroless images but just uses latest
6+ # CVEs will typically get fixed in versions (e.g deb12u7) and we'll need to rebuild this to incorporate them.
7+ ARG GOOGLE_DISTROLESS_BASE_IMAGE=gcr.io/distroless/cc-debian12:latest
8+
19# ARG instructions do not create additional layers. Instead, next layers will
210# concatenate them. Also, we have to repeat ARG instructions in each build
311# stage that uses them.
@@ -176,7 +184,7 @@ COPY build/fonts.conf /etc/fonts/conf.d/100-gotenberg.conf
176184# ----------------------------------------------
177185# Final stage
178186# ----------------------------------------------
179- FROM public.ecr.aws/j9h1x6x3/distroless-python:latest AS base
187+ FROM ${GOOGLE_DISTROLESS_BASE_IMAGE} AS base
180188
181189# Set platform-specific CHIPSET_ARCH
182190FROM base AS base-amd64
@@ -190,6 +198,11 @@ ARG CHIPSET_ARCH=aarch64-linux-gnu
190198ARG TARGETARCH
191199FROM base-${TARGETARCH}
192200
201+ # Required for unoconverter
202+ COPY --from=gotenberg-binary-stage /usr/bin/python /usr/bin/python
203+ COPY --from=gotenberg-binary-stage /usr/lib/python3 /usr/lib/python3
204+ COPY --from=gotenberg-binary-stage /usr/lib/python3.11 /usr/lib/python3.11
205+
193206ENV PYTHONPATH="/usr/local/lib/python3.11/dist-packages:"
194207
195208# LibreOffice dependencies
You can’t perform that action at this time.
0 commit comments