Skip to content

Commit 23d45d2

Browse files
Add devcontainer
1 parent 15762be commit 23d45d2

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.devcontainer.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Salt Install Guide",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/python:0-3.11-bullseye",
7+
"features": {
8+
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {
9+
"version": "latest"
10+
},
11+
"ghcr.io/devcontainers-contrib/features/nox:2": {
12+
"version": "latest"
13+
}
14+
},
15+
16+
// Features to add to the dev container. More info: https://containers.dev/features.
17+
// "features": {},
18+
19+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
20+
// "forwardPorts": [],
21+
22+
// Use 'postCreateCommand' to run commands after the container is created.
23+
// "postCreateCommand": "pip3 install -U pip setuptools"
24+
"postCreateCommand": "echo \"alias serve='python -m http.server -d /workspaces/salt-install-guide/docs/_build/html'\" >> ~/.bashrc && sudo apt update && sudo apt install vim -y && sudo rm -rf /var/lib/apt/lists/*"
25+
26+
// There is also a postStartCommand that executes every time the container starts.
27+
// The parameters behave exactly like postCreateCommand, but the commands execute on start rather than create.
28+
// "postStartCommand": "alias serve='python -m http.server -d /workspaces/salt-install-guide/docs/_build/html' > ~/.bashrc"
29+
30+
// Configure tool-specific properties.
31+
// "customizations": {},
32+
33+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
34+
// "remoteUser": "root"
35+
}

0 commit comments

Comments
 (0)