Skip to content

Commit df7d12b

Browse files
authored
Use python distroless instead of copying python into google distroless, as 2F scanning does not like that for some reason (#5)
1 parent 2cfb009 commit df7d12b

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

build/Dockerfile.distroless

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
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-
91
# ARG instructions do not create additional layers. Instead, next layers will
102
# concatenate them. Also, we have to repeat ARG instructions in each build
113
# stage that uses them.
@@ -184,7 +176,7 @@ COPY build/fonts.conf /etc/fonts/conf.d/100-gotenberg.conf
184176
# ----------------------------------------------
185177
# Final stage
186178
# ----------------------------------------------
187-
FROM ${GOOGLE_DISTROLESS_BASE_IMAGE} AS base
179+
FROM public.ecr.aws/j9h1x6x3/distroless-python:latest AS base
188180

189181
# Set platform-specific CHIPSET_ARCH
190182
FROM base AS base-amd64
@@ -198,11 +190,6 @@ ARG CHIPSET_ARCH=aarch64-linux-gnu
198190
ARG TARGETARCH
199191
FROM base-${TARGETARCH}
200192

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-
206193
ENV PYTHONPATH="/usr/local/lib/python3.11/dist-packages:"
207194

208195
# LibreOffice dependencies

0 commit comments

Comments
 (0)