🔥(y-provider) remove npm in docker image

We use yarn and not npm, we remove npm because it has a dependencie with
cross-spawn which has a CVE.
This commit is contained in:
Manuel Raynaud
2025-03-31 20:25:00 +02:00
parent 82eba1e8ea
commit 771ffdc7cc

View File

@@ -31,6 +31,9 @@ COPY --from=y-provider-builder \
RUN NODE_ENV=production yarn install --frozen-lockfile
# Remove npm, contains CVE related to cross-spawn and we don't use it.
RUN rm -rf /usr/local/bin/npm /usr/local/lib/node_modules/npm
# Un-privileged user running the application
ARG DOCKER_USER
USER ${DOCKER_USER}