From 8c6b62e224549bf58b521ca7c597990d2d7cf3e0 Mon Sep 17 00:00:00 2001 From: Sekwah Date: Mon, 22 Jul 2024 09:39:23 +0000 Subject: [PATCH] chore: switch to using dockerfile for dev container --- .devcontainer/Dockerfile | 28 ++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 7 ++++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..42f26a61 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,28 @@ +# Use an official Ubuntu base image +FROM ubuntu:22.04 + +RUN apt-get update && apt-get install -y \ + curl \ + git \ + libwebkit2gtk-4.1 \ + build-essential \ + wget \ + file \ + libssl-dev \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + javascriptcoregtk-4.1 + + + +# Install Rust using rustup +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + +# Install NVM and Node.js +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \ + && export NVM_DIR="$HOME/.nvm" \ + && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \ + && [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" \ + && nvm install 18 \ + && npm install -g yarn \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 707e34dc..91b38ccf 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,6 @@ { - "name": "Pomatez Dev", - "image": "ubuntu:22.04", - "postCreateCommand": "apt-get update && apt-get install -y curl git && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && export NVM_DIR=\"$HOME/.nvm\" && [ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\" && [ -s \"$NVM_DIR/bash_completion\" ] && \\. \"$NVM_DIR/bash_completion\"" + "name": "Pomatez Dev", + "build": { + "dockerfile": "Dockerfile" + } }