From 95deb90e0d854ce8384a500d2feeb0cfa7740749 Mon Sep 17 00:00:00 2001 From: dervoeti Date: Thu, 27 Aug 2026 08:23:20 +0000 Subject: [PATCH] fix(superset): Do not ship Node and npm in the final image --- CHANGELOG.md | 2 ++ superset/Dockerfile | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d2bac556..687bd9c53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file. - spark: Propagate the entrypoint's exit code so failed applications are no longer reported as successful ([#1595]). - superset: Fix the broken builds by excluding the `cypress-base` end-to-end test project from the frontend SBOM ([#1616]). - superset: Fix the broken 4.1.4 build by also excluding `packages/superset-ui-switchboard` from the frontend SBOM ([#1620]). +- superset: Install nvm into `/opt/nvm` so that Node and npm, which are only needed to build the frontend, are no longer shipped in the final image (about 161 MB) ([#1623]). ### Removed @@ -34,6 +35,7 @@ All notable changes to this project will be documented in this file. [#1611]: https://github.com/stackabletech/docker-images/pull/1611 [#1616]: https://github.com/stackabletech/docker-images/pull/1616 [#1620]: https://github.com/stackabletech/docker-images/pull/1620 +[#1623]: https://github.com/stackabletech/docker-images/pull/1623 ## [26.7.0] - 2026-07-21 diff --git a/superset/Dockerfile b/superset/Dockerfile index 6ea45e2ab..7eacfe328 100644 --- a/superset/Dockerfile +++ b/superset/Dockerfile @@ -88,10 +88,16 @@ COPY --chown=${STACKABLE_USER_UID}:0 superset/stackable/patches/${PRODUCT_VERSIO WORKDIR /stackable +# nvm derives its installation directory from the location of nvm.sh if NVM_DIR is not set. +# It must not end up anywhere below /stackable, because the final image copies that directory +# as a whole and would then ship Node and npm, which are only needed to build the frontend. +ENV NVM_DIR=/opt/nvm + RUN <