Skip to content

Commit

Permalink
Feature pnp#2683 : added support for containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Gautam Sheth committed Oct 13, 2023
1 parent 6d7f059 commit dbbe324
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "PnP PowerShell container",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:0-6.0",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git:1": {
"ppa": true,
"version": "os-provided"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"installDirectlyFromGitHubRelease": true,
"version": "latest"
},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
}
},
"workspaceFolder": "/workspaces/powershell",

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash ./build/postCreateCommand.sh",

// Configure tool-specific properties.
// "customizations": {},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "pwsh"
},
"extensions": [
"ms-vscode.powershell",
"ms-dotnettools.csdevkit"
]
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
3 changes: 3 additions & 0 deletions build/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dotnet tool update -g docfx

/usr/bin/pwsh -c 'Install-Module Microsoft.PowerShell.SecretStore,Microsoft.Powershell.SecretManagement,PlatyPS -Force'

0 comments on commit dbbe324

Please sign in to comment.