From 270dabfecac9e8416f6871ae0baa863daa85a02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 18 Nov 2023 09:27:50 +0100 Subject: [PATCH] Add devcontainer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .devcontainer/Dockerfile | 7 +++++++ .devcontainer/devcontainer.json | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..98212f28 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,7 @@ +FROM node:21-alpine3.18 +RUN apk add --no-cache \ + git \ + nano\ + openssh + +USER node diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..8a443e02 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +{ + "name": "Pi-hole web devcontainer", + "dockerFile": "Dockerfile", + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "npm install", + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + "settings": {}, + "extensions": [ + "eamodio.gitlens", + "EditorConfig.EditorConfig", + "github.vscode-github-actions" + ] + } + }, + "containerEnv": { + "GIT_EDITOR": "nano" + }, + "mounts": [ + "type=bind,source=/home/${localEnv:USER}/.ssh,target=/root/.ssh,readonly" + ] +}