Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
fix(docker): drop bundled npm from runtime image to clear base-image CVEs
Roger Hoem-Martinsen413448037cfe
diff --git a/Dockerfile b/Dockerfileindex d9e967b26..c71b5435c 100644--- a/Dockerfile+++ b/Dockerfile@@ -44,9 +44,13 @@ ENV NODE_OPTIONS=$NODE_OPTIONSRUN addgroup --system --gid 1001 nodejsRUN adduser --system --uid 1001 nextjs+# Bootstrap pnpm with the bundled npm, then remove npm in the same layer so the+# vulnerable packages vendored inside the npm CLI are not shipped in the final+# image. pnpm is the only package manager needed at build and runtime.RUN set -x \&& apk add --no-cache curl libc6-compat \- && npm install -g pnpm+ && npm install -g pnpm \+ && rm -rf /usr/local/lib/node_modules/npm /usr/local/bin/npm /usr/local/bin/npxRUN echo {} > package.json@@ -76,4 +80,4 @@ EXPOSE 3000ENV HOSTNAME=0.0.0.0ENV PORT=3000-CMD ["npm", "run", "start-docker"]+CMD ["pnpm", "run", "start-docker"]