Skip to content

Commit 7fc2f17

Browse files
committed
Install pwsh modules in startup
1 parent 7e67d3b commit 7fc2f17

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.devcontainer/container-start.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33

44
# Note:
55
# This is run during container startup.
6+
Install-Module -Name 'Az' -Repository PSGallery -Force
7+
Install-Module -Name 'PSRule.Rules.Azure' -Repository PSGallery -Scope CurrentUser

.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
"editorconfig.editorconfig"
5757
]
5858
}
59-
}
59+
},
60+
"onCreateCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-build.ps1",
61+
"postStartCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-start.ps1"
6062
// Use 'forwardPorts' to make a list of ports inside the container available locally.
6163
// "forwardPorts": [],
6264
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.

0 commit comments

Comments
 (0)