Fix npm global directory owner
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 20 Jan 2023 16:56:27 +0000 (17:56 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 20 Jan 2023 16:56:27 +0000 (17:56 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
Dockerfile

index 8d4d40779e37984fb24340655bc4248e5d8ad358..30832c39522395f035df2ea618fc1c20a678120a 100644 (file)
@@ -188,7 +188,8 @@ RUN set -ex \
   && python3 --version
 
 # Allow global npm packages install without sudo
-RUN mkdir ${USER_HOME_DIR}/.npm-global
+RUN mkdir ${USER_HOME_DIR}/.npm-global \
+  && chown ${USER}:${USER} ${USER_HOME_DIR}/.npm-global
 ENV NPM_CONFIG_PREFIX ${USER_HOME_DIR}/.npm-global
 
 WORKDIR /project