From 9df7e7582cebd61521c1eb7217d08f2cb5e44fc4 Mon Sep 17 00:00:00 2001 From: Akash-Nayak Date: Wed, 7 Dec 2022 23:25:05 +0530 Subject: [PATCH] fix: Prevent docker build from failing if .npm folder is missing (#924) Signed-off-by: Akash Nayak --- .../transformers/dockerfilegenerator/nodejs/templates/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/built-in/transformers/dockerfilegenerator/nodejs/templates/Dockerfile b/assets/built-in/transformers/dockerfilegenerator/nodejs/templates/Dockerfile index 17b25d933..e82af320d 100644 --- a/assets/built-in/transformers/dockerfilegenerator/nodejs/templates/Dockerfile +++ b/assets/built-in/transformers/dockerfilegenerator/nodejs/templates/Dockerfile @@ -23,6 +23,7 @@ RUN {{ .PackageManager }} run build {{- end}} {{- if eq .PackageManager "npm" }} USER root +RUN mkdir -p /opt/app-root/src/.npm RUN chown -R 1001:0 /opt/app-root/src/.npm RUN chmod -R 775 /opt/app-root/src/.npm USER 1001