Yasuhiro Arakaki
04/01/2026, 1:43 AMUSER to the production Dockerfile: https://github.com/lightdash/lightdash/issues/20322
Currently the prod stage doesn't set a USER directive, so the container runs as root by default. This is a security concern — if a vulnerability is exploited, an attacker could gain root-level access to the container. Docker's best practices also recommend running as a non-root user: https://docs.docker.com/build/building/best-practices/#user
I'd like to contribute a PR for this. Before I start, a few questions:
- Is this something the team would welcome as a contribution? (I see it's tracked as PROD-3033)
- Should this be treated as a breaking change? Users who mount host volumes may hit permission issues after this change.
- Any preference on UID/GID values or approach?
Happy to align on the approach first before writing any code. Thanks!Oliver Ramsay
04/01/2026, 7:39 AMCharlie Dowler
04/01/2026, 11:52 AMYasuhiro Arakaki
04/01/2026, 12:00 PM