From 952817ec0226b8abbb0991547b149ce964059a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20M=C3=B8rk=20Hegnh=C3=B8j?= Date: Tue, 10 Sep 2024 11:16:36 +0200 Subject: [PATCH] Updating dev container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mikkel Mørk Hegnhøj --- .devcontainer/Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 032bedb..942ccfc 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -26,6 +26,9 @@ ARG TINYGO_VERSION="0.33.0" RUN wget "https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VERSION}/tinygo_${TINYGO_VERSION}_${TARGETARCH}.deb" && \ dpkg -i "tinygo_${TINYGO_VERSION}_${TARGETARCH}.deb" +# Set the current user before spin install for plugins/templates +USER $USERNAME + # Install Spin ARG SPIN_VERSION="v2.7.0" RUN mkdir -p /opt/spin && \ @@ -38,17 +41,12 @@ ENV PATH="$PATH:/home/$USERNAME/.cargo/bin" RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- \ -y --target wasm32-wasi -# Set the current user before spin install for plugins/templates -USER $USERNAME - # Install Node and NPM ARG NODE_VERSION=20 ENV NVM_DIR=/home/${USERNAME}/.nvm RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}" -#RUN node --version -#RUN npm --version # Install Spin Plugins & Templates RUN spin plugins update && \