From 83e7a8fc89b2878ea76e01a42e4a38053897f289 Mon Sep 17 00:00:00 2001 From: rusackas Date: Wed, 29 Jul 2026 22:44:55 -0700 Subject: [PATCH] docs: strip leaked .po files when copying translations to custom image The intermediate build stages' own cleanup only matches single-character extensions (a `*.[po,mo]`-style glob), so `.po` source files can still be present when copied into a custom image. Strip them explicitly in the documented recipe so it does what the comment says. Co-Authored-By: Claude Opus 4.8 --- docs/admin_docs/installation/docker-builds.mdx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/admin_docs/installation/docker-builds.mdx b/docs/admin_docs/installation/docker-builds.mdx index 8102e79d512..df170b5cb6f 100644 --- a/docs/admin_docs/installation/docker-builds.mdx +++ b/docs/admin_docs/installation/docker-builds.mdx @@ -132,12 +132,14 @@ Docker can reuse the cached upstream layers and only rebuild what your stage add FROM apache/superset:5.0.0 AS my-custom-image USER root -# Pull the compiled translation files out of the earlier build stages. These -# only exist mid-build (frontend .json in `superset-node`, backend .mo in -# `python-translation-compiler`) and get stripped from the final `lean`/`dev` -# stages unless BUILD_TRANSLATIONS=true. +# Pull the translation files out of the earlier build stages (frontend +# .json in `superset-node`, backend .mo in `python-translation-compiler`). +# Those stages' own cleanup only matches single-character extensions, so +# the source `.po` files can still be present here; strip them explicitly +# so this stage only keeps the compiled translations. COPY --from=superset-node /app/superset/translations superset/translations COPY --from=python-translation-compiler /app/translations_mo superset/translations +RUN find superset/translations -name '*.po' -delete USER superset ```