dosubot[bot] commented on issue #35581: URL: https://github.com/apache/superset/issues/35581#issuecomment-3929233775
<!-- Answer --> The core issue is that **official Docker images don't include translation files by default** to reduce image size. Since npm isn't available in the pre-built image, you can't run `build-translation` inside the container. Here are your options: **Option 1: Rebuild the image with translations enabled** ```bash docker build --build-arg BUILD_TRANSLATIONS=true -t superset:custom . ``` Note: There's a [known bug in 5.0.0](https://github.com/apache/superset/issues/35959#issuecomment-3480977131) where this argument didn't work properly—it may be fixed in 6.0.0, but worth verifying. **Option 2: Build locally and mount/copy the files** Since you can't build inside the container, build on your local machine and copy the result: 1. Clone the repo and run on your local machine (where npm is available): ```bash cd superset-frontend && npm ci && npm run build-translation cd .. && pybabel compile -d superset/translations ``` 2. Copy or mount the generated `messages.json` file into your container at: ``` /app/superset/translations/ru/LC_MESSAGES/messages.json ``` 3. Restart Superset You can use a Docker volume mount or a custom Dockerfile that copies the pre-built file. **Additional note:** If you're using embedded dashboards, there's also [a known auth issue](https://github.com/apache/superset/issues/36459#issuecomment-3628824997) where the `/language_pack/` endpoint blocks requests before guest tokens are set—but that's a separate issue from the missing files. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/833f3c95-0756-42b6-9eec-39c4ce7c3ef7?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/833f3c95-0756-42b6-9eec-39c4ce7c3ef7?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/833f3c95-0756-42b6-9eec-39c4ce7c3ef7?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/833f3c95-0756-42b6-9eec-39c4ce7c3ef7?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/833f3c95-0756-42b6-9eec-39c4ce7c3ef7?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/833f3c95-0756-42b6-9eec-39c4ce7c3ef7?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/833f3c95-0756-42b6-9eec-39c4ce7c3ef7?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=The%20core%20issue%20is%20that%20%2A%2Aofficial%20Docker%20images%20don%27t%20include%20translation%20files%20by%20default%2A%2A%20to%20reduce%20image%20size.%20Since%20npm%20isn%27t%20available%20in%20the%20pre-built%20image%2C%20you%20can%27t%20run%20%60build-translation%60%20inside%20the%20container.%0A%0AHere%20are%20your%20options%3A%0A%0A%2A%2AOption%201%3A%20Rebuild%20the%20image%20with%20translations%20enabled%2A%2A%0A%60%60%60bash%0Adocker%20build%20--build-arg%20BUILD_TRANSLATIONS%3Dtrue%20-t%20superset%3Acustom%20.%0A%60%60%60%0ANote%3A%20There%27s%20a%20%5Bknown%20bug%20in%205.0.0%5D%28https%3A//github.com/apache/superset/issues/35959%23issuecomment-3480977131%29%20where%20this%20argument%20didn%27t%20work%20properly%E2%80%94it%20may%20 be%20fixed%20in%206.0.0%2C%20but%20worth%20verifying.%0A%0A%2A%2AOption%202%3A%20Build%20locally%20and%20mount/copy%20the%20files%2A%2A%0ASince%20you%20can%27t%20build%20inside%20the%20container%2C%20build%20on%20your%20local%20machine%20and%20copy%20the%20result%3A%0A%0A1.%20Clone%20the%20repo%20and%20run%20on%20your%20local%20machine%20%28where%20npm%20is%20available%29%3A%0A%20%20%20%60%60%60bash%0A%20%20%20cd%20superset-frontend%20%26%26%20npm%20ci%20%26%26%20npm%20run%20build-translation%0A%20%20%20cd%20..%20%26%26%20pybabel%20compile%20-d%20superset/translations%0A%20%20%20%60%60%60%0A%0A2.%20Copy%20or%20mount%20the%20generated%20%60messages.json%60%20file%20into%20your%20container%20at%3A%0A%20%20%20%60%60%60%0A%20%20%20/app/superset/translations/ru/LC_MESSAGES/messages.json%0A%20%20%20%60%60%60%0A%0A3.%20Restart%20Superset%0A%0AYou%20can%20use%20a%20Docker%20volume%20mount%20or%20a%20custom%20Dockerfile%20that%20copies%20the%20pre-built%20file.%0A%0A%2A%2AAdditional%20note%3 A%2A%2A%20If%20you%27re%20using%20embedded%20dashboards%2C%20there%27s%20also%20%5Ba%20known%20auth%20issue%5D%28https%3A//github.com/apache/superset/issues/36459%23issuecomment-3628824997%29%20where%20the%20%60/language_pack/%60%20endpoint%20blocks%20requests%20before%20guest%20tokens%20are%20set%E2%80%94but%20that%27s%20a%20separate%20issue%20from%20the%20missing%20files.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35581) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
