From 187291eecad34896f2c059807933df8e6bfa770a Mon Sep 17 00:00:00 2001 From: Florian Hye <31217036+Flo2410@users.noreply.github.com> Date: Fri, 9 Feb 2024 20:46:56 +0100 Subject: [PATCH] Chore: add Python requirements and prettier to devcontaier (#2878) --- .devcontainer/Dockerfile | 6 ++++ .devcontainer/devcontainer.json | 49 ++++++++++++++++----------------- .devcontainer/setup.sh | 2 ++ 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9f20426fc..44bc17593 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,4 +3,10 @@ FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} RUN npm install -g pnpm +RUN apt-get update \ + && apt-get -y install --no-install-recommends \ + python3-pip \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* + ENV PATH="${PATH}:./node_modules/.bin" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 15d1b9f31..06e7f6ee1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,27 +1,26 @@ { - "name": "homepage", - "build": { - "dockerfile": "Dockerfile", - "args": { - "VARIANT": "18-bullseye" - } - }, - "customizations": { - "vscode": { - "extensions": [ - "dbaeumer.vscode-eslint", - "mhutchie.git-graph", - "streetsidesoftware.code-spell-checker", - ], - "settings": { - "eslint.format.enable": true, - "eslint.lintTask.enable": true, - "eslint.packageManager": "pnpm" - } - } - }, - "postCreateCommand": ".devcontainer/setup.sh", - "forwardPorts": [ - 3000 - ] + "name": "homepage", + "build": { + "dockerfile": "Dockerfile", + "args": { + "VARIANT": "18-bullseye", + }, + }, + "customizations": { + "vscode": { + "extensions": [ + "dbaeumer.vscode-eslint", + "mhutchie.git-graph", + "streetsidesoftware.code-spell-checker", + "esbenp.prettier-vscode", + ], + "settings": { + "eslint.format.enable": true, + "eslint.lintTask.enable": true, + "eslint.packageManager": "pnpm", + }, + }, + }, + "postCreateCommand": ".devcontainer/setup.sh", + "forwardPorts": [3000], } diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 70bf96cfd..ea5d2fe9b 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -3,6 +3,8 @@ # Install Node packages pnpm install +python3 -m pip install -r requirements.txt + # Copy in skeleton configuration if there is no existing configuration if [ ! -d "config/" ]; then echo "Adding skeleton config"