-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #979 from pi-hole/devcontainer
Add devcontainer
- Loading branch information
Showing
5 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/sh | ||
npm install | ||
pip3 install -r requirements.txt --break-system-packages --no-warn-script-location |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters