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 && \