From cd6b37dc58b90e309aaa72a9e20cb213a1f9b0d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 20 Jan 2023 17:00:32 +0100 Subject: [PATCH 1/1] Allow global npm packages install without sudo MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .xmake.cfg | 2 +- Dockerfile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.xmake.cfg b/.xmake.cfg index ce12634..dfceb57 100644 --- a/.xmake.cfg +++ b/.xmake.cfg @@ -1,5 +1,5 @@ [xmake] -version=1.0.13 +version=1.0.14 # https://github.wdf.sap.corp/pages/xmake-ci/User-Guide/Setting_up_a_Build/Release_Procedure/Release_Versions/ [buildplugin] diff --git a/Dockerfile b/Dockerfile index 3fe3d33..6cdb080 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,8 +71,6 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ | sort -u \ | xargs -r apt-mark manual \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - # for npm link - && chown -R ${USER}:${USER} /usr/local/lib/node_modules \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ # smoke tests && node --version \ @@ -189,5 +187,8 @@ RUN set -ex \ # smoke test && python3 --version +# Allow global npm packages install without sudo +ENV NPM_CONFIG_PREFIX ${USER_HOME_DIR}/.npm-global + WORKDIR /project USER ${USER} -- 2.34.1