From aa2b88608d1de3ef0622b4500eef4e75ca356a24 Mon Sep 17 00:00:00 2001 From: Tim Hellhake Date: Sat, 8 Jun 2024 23:37:19 +0200 Subject: [PATCH] Install nvm as runner --- toolchain/linux-arm/node/Dockerfile | 7 ++++--- toolchain/linux-arm64/node/Dockerfile | 7 ++++--- toolchain/linux-x64/node/Dockerfile | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/toolchain/linux-arm/node/Dockerfile b/toolchain/linux-arm/node/Dockerfile index ab87761..df69d7c 100644 --- a/toolchain/linux-arm/node/Dockerfile +++ b/toolchain/linux-arm/node/Dockerfile @@ -24,8 +24,10 @@ RUN apt update && \ sudo \ zlib1g-dev && \ apt clean && \ - rm -rf /var/lib/apt/lists/* && \ - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \ + rm -rf /var/lib/apt/lists/* +RUN useradd -u 1001 -m runner +USER runner +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \ bash -c "export NVM_DIR=\${HOME}/.nvm && \ source \${NVM_DIR}/nvm.sh && \ nvm install ${NODE_VERSION} && \ @@ -34,4 +36,3 @@ RUN apt update && \ npm config -g set cache /tmp/.npm && \ nvm install-latest-npm && \ nvm cache clear" -RUN useradd -u 1001 runner diff --git a/toolchain/linux-arm64/node/Dockerfile b/toolchain/linux-arm64/node/Dockerfile index 01dbaf4..f0f3eec 100644 --- a/toolchain/linux-arm64/node/Dockerfile +++ b/toolchain/linux-arm64/node/Dockerfile @@ -24,8 +24,10 @@ RUN apt update && \ sudo \ zlib1g-dev && \ apt clean && \ - rm -rf /var/lib/apt/lists/* && \ - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \ + rm -rf /var/lib/apt/lists/* +RUN useradd -u 1001 -m runner +USER runner +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \ bash -c "export NVM_DIR=\${HOME}/.nvm && \ source \${NVM_DIR}/nvm.sh && \ nvm install ${NODE_VERSION} && \ @@ -34,4 +36,3 @@ RUN apt update && \ npm config -g set cache /tmp/.npm && \ nvm install-latest-npm && \ nvm cache clear" -RUN useradd -u 1001 runner diff --git a/toolchain/linux-x64/node/Dockerfile b/toolchain/linux-x64/node/Dockerfile index 4a1201f..658374c 100644 --- a/toolchain/linux-x64/node/Dockerfile +++ b/toolchain/linux-x64/node/Dockerfile @@ -24,8 +24,10 @@ RUN apt update && \ sudo \ zlib1g-dev && \ apt clean && \ - rm -rf /var/lib/apt/lists/* && \ - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \ + rm -rf /var/lib/apt/lists/* +RUN useradd -u 1001 -m runner +USER runner +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && \ bash -c "export NVM_DIR=\${HOME}/.nvm && \ source \${NVM_DIR}/nvm.sh && \ nvm install ${NODE_VERSION} && \ @@ -34,4 +36,3 @@ RUN apt update && \ npm config -g set cache /tmp/.npm && \ nvm install-latest-npm && \ nvm cache clear" -RUN useradd -u 1001 runner