Skip to content

Commit fb557fb

Browse files
committed
Add devcontainer
1 parent 8aa80e2 commit fb557fb

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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/dotnet
3+
{
4+
"name": "Dapr Workflow Demo",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",
7+
"features": {
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
9+
"ghcr.io/dapr/cli/dapr-cli:0": {}
10+
},
11+
12+
// Features to add to the dev container. More info: https://containers.dev/features.
13+
// "features": {},
14+
15+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
16+
"forwardPorts": [5063, 5064, 5065, 3500, 3501],
17+
// "portsAttributes": {
18+
// "5001": {
19+
// "protocol": "https"
20+
// }
21+
// }
22+
23+
// Use 'postCreateCommand' to run commands after the container is created.
24+
"postCreateCommand": "bash scripts/install.sh",
25+
26+
// Configure tool-specific properties.
27+
"customizations": {
28+
"vscode": {
29+
"extensions": [
30+
"ms-dotnettools.csharp",
31+
"humao.rest-client",
32+
"vsls-contrib.codetour"
33+
]
34+
}
35+
},
36+
37+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
38+
"remoteUser": "root"
39+
}

scripts/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dapr uninstall
2+
dapr init
3+
dotnet build ./BasicWorkflowSamples
4+
dotnet build ./OrderProcess

0 commit comments

Comments
 (0)