Skip to content

Commit efeb70a

Browse files
committed
feat: Install required PowerShell modules and CSpell in dev container and use latest image. Missed updating this devcontainer.json last time
1 parent 02127bf commit efeb70a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ScriptModuleRepositoryTemplate/TemplateRepoFiles/_.devcontainer/devcontainer.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
{
44
"name": "PowerShell",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/powershell:lts-debian-11",
6+
"image": "mcr.microsoft.com/dotnet/sdk:9.0",
77
"features": {
88
"ghcr.io/devcontainers/features/common-utils:2": {
99
"installZsh": "true",
1010
"username": "vscode",
1111
"upgradePackages": "false",
1212
"nonFreePackages": "true"
13-
}
13+
}//, // Uncomment this line and the one below to install the dotnet CLI.
14+
//"ghcr.io/devcontainers/features/dotnet:2": "latest" // Installs the dotnet CLI.
1415
},
1516

16-
// Set VS Code's default shell to PowerShell.
17-
"postCreateCommand": "sudo chsh vscode -s \"$(which pwsh)\"",
17+
// Set pwsh as the default shell for the devcontainer, install required PowerShell modules, and install NPM and CSpell.
18+
// If you do not plan to use CSpell, you can remove everything after and including 'sudo apt update'.
19+
"postCreateCommand": "sudo chsh vscode -s \"$(which pwsh)\"; pwsh -c \"Install-Module Pester -Force\"; pwsh -c \"Install-Module PSScriptAnalyzer -Force\"; sudo apt update; sudo DEBIAN_FRONTEND=noninteractive apt install -y npm; npm install cspell",
1820

1921
// Configure tool-specific properties.
2022
"customizations": {

0 commit comments

Comments
 (0)