From 720f837b026692ef17c18c3164e18d247549224c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20M=C3=B8rk=20Hegnh=C3=B8j?= Date: Tue, 10 Sep 2024 11:09:55 +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 | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8045e11..032bedb 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,7 +2,7 @@ # it avoids downloading any platform-specific binaries, and installs the required # tools either through Debian's package manager, or through installation scripts # that download the appropriate binaries. -FROM mcr.microsoft.com/devcontainers/base:jammy +FROM mcr.microsoft.com/devcontainers/base:ubuntu # provided by docker ARG TARGETARCH @@ -10,38 +10,46 @@ ARG USERNAME=vscode ARG USER_UID=1000 ARG USER_GID=$USER_UID -RUN apt-get update && apt-get install -y \ - nodejs \ - npm \ - python3-pip +# Install Python +RUN sudo apt update +RUN sudo apt install python3.10-venv -y # Install Go -ARG GO_VERSION="1.22.1" +ARG GO_VERSION="1.23.1" RUN wget -O go.tar.gz "https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz" && \ tar -C /usr/local -xzf go.tar.gz && \ rm go.tar.gz ENV PATH="$PATH:/usr/local/go/bin" # Install TinyGo -ARG TINYGO_VERSION="0.31.1" +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" # Install Spin -ARG SPIN_VERSION="v2.3.1" +ARG SPIN_VERSION="v2.7.0" RUN mkdir -p /opt/spin && \ cd /opt/spin && \ curl -fsSL https://developer.fermyon.com/downloads/install.sh | bash -s -- -v $SPIN_VERSION && \ ln -s /opt/spin/spin /usr/local/bin/spin -# Set the current user before spin install for plugins/templates -USER $USERNAME - # Install Rust 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 && \ spin plugins install check-for-update -y && \