Skip to content

Commit 6d7d67a

Browse files
committed
feat: Add devcontainer to repo and template.
docs: Remove devcontainer from TODO
1 parent 502d401 commit 6d7d67a

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// For format details, see: https://aka.ms/devcontainer.json.
2+
// For config options, see: https://github.com/devcontainers/templates/tree/main/src/powershell.
3+
{
4+
"name": "PowerShell",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/powershell:lts-debian-11",
7+
"features": {
8+
"ghcr.io/devcontainers/features/common-utils:2": {
9+
"installZsh": "true",
10+
"username": "vscode",
11+
"upgradePackages": "false",
12+
"nonFreePackages": "true"
13+
}
14+
},
15+
16+
// Set VS Code's default shell to PowerShell.
17+
"postCreateCommand": "sudo chsh vscode -s \"$(which pwsh)\"",
18+
19+
// Configure tool-specific properties.
20+
"customizations": {
21+
// Configure properties specific to VS Code.
22+
"vscode": {
23+
// Set *default* container specific settings.json values on container create.
24+
"settings": {
25+
"terminal.integrated.defaultProfile.linux": "pwsh"
26+
},
27+
// Add the IDs of extensions you want installed when the container is created.
28+
"extensions": [
29+
"EditorConfig.EditorConfig",
30+
"ms-vscode.powershell",
31+
"TylerLeonhardt.vscode-inline-values-powershell",
32+
"yzhang.markdown-all-in-one"
33+
]
34+
}
35+
}
36+
37+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
38+
// "forwardPorts": [],
39+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
40+
// "remoteUser": "root"
41+
}

ReadMe.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,3 @@ Things to still do:
121121
- To prevent having to store CI/CD manual setup images in the repo, maybe have them as an external link to a GitHub branch.
122122
- Also create videos showing how to do the setup.
123123
- Maybe show instructions for setting up GitHub / Azure DevOps CI/CD during the initialization script. Or mention to follow the ReadMe instructions.
124-
- Add a simple PowerShell devcontainer for both this repo and the template.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// For format details, see: https://aka.ms/devcontainer.json.
2+
// For config options, see: https://github.com/devcontainers/templates/tree/main/src/powershell.
3+
{
4+
"name": "PowerShell",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/powershell:lts-debian-11",
7+
"features": {
8+
"ghcr.io/devcontainers/features/common-utils:2": {
9+
"installZsh": "true",
10+
"username": "vscode",
11+
"upgradePackages": "false",
12+
"nonFreePackages": "true"
13+
}
14+
},
15+
16+
// Set VS Code's default shell to PowerShell.
17+
"postCreateCommand": "sudo chsh vscode -s \"$(which pwsh)\"",
18+
19+
// Configure tool-specific properties.
20+
"customizations": {
21+
// Configure properties specific to VS Code.
22+
"vscode": {
23+
// Set *default* container specific settings.json values on container create.
24+
"settings": {
25+
"terminal.integrated.defaultProfile.linux": "pwsh"
26+
},
27+
// Add the IDs of extensions you want installed when the container is created.
28+
"extensions": [
29+
"EditorConfig.EditorConfig",
30+
"ms-vscode.powershell",
31+
"TylerLeonhardt.vscode-inline-values-powershell",
32+
"yzhang.markdown-all-in-one"
33+
]
34+
}
35+
}
36+
37+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
38+
// "forwardPorts": [],
39+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
40+
// "remoteUser": "root"
41+
}

0 commit comments

Comments
 (0)