Merge pull request #979 from pi-hole/devcontainer

Add devcontainer
This commit is contained in:
yubiuser
2024-02-23 22:21:52 +01:00
committed by GitHub
5 changed files with 44 additions and 3 deletions
+11
View File
@@ -0,0 +1,11 @@
FROM node:21-alpine3.19
RUN apk add --no-cache \
git \
nano\
openssh \
py3-pip
ENV USER node
USER $USER
# python packages (as mkdocs) are installed in the user's home directory
# but we need them to be accessible from $PATH
ENV PATH="$PATH:/home/$USER/.local/bin"
+26
View File
@@ -0,0 +1,26 @@
{
"name": "Pi-hole doc devcontainer",
"dockerFile": "Dockerfile",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sh .devcontainer/post-create.sh",
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"eamodio.gitlens",
"EditorConfig.EditorConfig",
"github.vscode-github-actions",
"DavidAnson.vscode-markdownlint"
]
}
},
"containerEnv": {
"GIT_EDITOR": "nano"
},
"mounts": [
"type=bind,source=/home/${localEnv:USER}/.ssh,target=/home/node/.ssh,readonly"
],
"forwardPorts": [8000]
}
+3
View File
@@ -0,0 +1,3 @@
#! /bin/sh
npm install
pip3 install -r requirements.txt --break-system-packages --no-warn-script-location
+1 -1
View File
@@ -10,7 +10,7 @@
"license": "CC-BY-SA-4.0",
"devDependencies": {
"linkinator": "^6.0.4",
"markdownlint-cli2": "0.12.1"
"markdownlint-cli2": "^0.12.0"
}
},
"node_modules/@isaacs/cliui": {
+3 -2
View File
@@ -19,10 +19,11 @@
"build": "mkdocs build --clean",
"markdownlint": "markdownlint-cli2 \"**/*.md\" \"!**/node_modules/**\"",
"linkinator": "npm run build && linkinator site --recurse --silent --skip \"^(?!http://localhost)\"",
"test": "npm run markdownlint && npm run linkinator"
"test": "npm run markdownlint && npm run linkinator",
"serve": "mkdocs serve --dev-addr 0.0.0.0:8000"
},
"devDependencies": {
"linkinator": "^6.0.4",
"markdownlint-cli2": "0.12.1"
"markdownlint-cli2": "^0.12.0"
}
}