GitHub user dawagner added a comment to the discussion: superset 5.0.0
translation is not available
Here's how I solved this: at the end of the official Dockerfile, I added:
```
FROM apachesuperset.docker.scarf.sh/apache/superset:5.0.0 AS my-custom-image
USER root
# copy translation files
COPY --from=superset-node /app/superset/translations superset/translations
COPY --from=python-translation-compiler /app/translations_mo
superset/translations
USER superset
```
btw, I also seized the opportunity to add some optional dependencies, such as
database drivers, like so (before `USER superset`):
```
# install dependencies needed for postgres support
# inspired by - flatly copy-pasted from, I should say - the `lean` build stage
RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
uv pip install .[postgres]
```
and, of course, I have to add `--target=my-custom-image
--build-arg=BUILD_TRANSLATIONS=true` to `docker build` command.
The drawback is that I have to keep a fork of superset but the advantage is
that the build is, I believe, as fast as possible (because it will only rebuild
the required stages, not the whole image) and the changes are easy to maintain.
But **if the compiled translation files could be provided as release
artifacts**, we could make this even faster/more maintainable.
GitHub link:
https://github.com/apache/superset/discussions/42585#discussioncomment-17832860
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]