Skip to content

Commit 2075bdd

Browse files
authored
Update devcontainer settings (#2)
1 parent 2046b4f commit 2075bdd

File tree

2 files changed

+60
-27
lines changed

2 files changed

+60
-27
lines changed

.devcontainer/devcontainer.json

+41-27
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,45 @@
11
{
2-
"name": "Azure Developer CLI",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.10-bullseye",
4-
"features": {
5-
// See https://containers.dev/features for list of features
6-
"ghcr.io/devcontainers/features/docker-in-docker:2": {
7-
},
8-
"ghcr.io/azure/azure-dev/azd:latest": {}
2+
"name": "Azure EasyAuth Sample",
3+
4+
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0-noble",
5+
6+
"features": {
7+
"ghcr.io/azure/azure-dev/azd:latest": {},
8+
"ghcr.io/devcontainers/features/dotnet:latest": {
9+
"version": "9.0"
910
},
10-
"customizations": {
11-
"vscode": {
12-
"extensions": [
13-
"GitHub.vscode-github-actions",
14-
"ms-azuretools.azure-dev",
15-
"ms-azuretools.vscode-azurefunctions",
16-
"ms-azuretools.vscode-bicep",
17-
"ms-azuretools.vscode-docker"
18-
// Include other VSCode language extensions if needed
19-
// Right click on an extension inside VSCode to add directly to devcontainer.json, or copy the extension ID
20-
]
21-
}
11+
"ghcr.io/devcontainers/features/azure-cli:latest": {
12+
"extensions": "account,containerapp,deploy-to-azure,functionapp,staticwebapp,subscription,webapp"
2213
},
23-
"forwardPorts": [
24-
// Forward ports if needed for local development
25-
],
26-
"postCreateCommand": "",
27-
"remoteUser": "vscode",
28-
"hostRequirements": {
29-
"memory": "8gb"
14+
"ghcr.io/devcontainers/features/github-cli:latest": {},
15+
"ghcr.io/devcontainers/features/docker-in-docker": {},
16+
"ghcr.io/devcontainers/features/node:latest": {},
17+
"ghcr.io/devcontainers/features/common-utils:latest": {}
18+
},
19+
20+
"customizations": {
21+
"vscode": {
22+
"extensions": [
23+
"EditorConfig.EditorConfig",
24+
"GitHub.copilot",
25+
"GitHub.copilot-chat",
26+
"GitHub.vscode-github-actions",
27+
"GitHub.vscode-pull-request-github",
28+
"ms-azuretools.vscode-bicep",
29+
"ms-azuretools.vscode-docker",
30+
"ms-dotnettools.csharp",
31+
"ms-dotnettools.csdevkit",
32+
"ms-vscode.vscode-node-azure-pack",
33+
"redhat.vscode-yaml"
34+
]
3035
}
31-
}
36+
},
37+
38+
"remoteUser": "vscode",
39+
40+
"onCreateCommand": "./.devcontainer/on-create.sh > ~/on-create.log",
41+
42+
"hostRequirements": {
43+
"memory": "8gb"
44+
}
45+
}

.devcontainer/on-create.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
sudo apt-get update && \
2+
sudo apt upgrade -y && \
3+
sudo apt-get install -y dos2unix libsecret-1-0 xdg-utils && \
4+
sudo apt clean -y && \
5+
sudo rm -rf /var/lib/apt/lists/*
6+
7+
echo Update .NET workloads
8+
dotnet workload update --from-previous-sdk
9+
10+
echo Install .NET dev certs
11+
dotnet dev-certs https --trust
12+
13+
echo Install Aspire 9 templates
14+
dotnet new install Aspire.ProjectTemplates
15+
16+
echo Install SWA CLI
17+
npm install -g @azure/static-web-apps-cli
18+
19+
echo Done!

0 commit comments

Comments
 (0)