-
Notifications
You must be signed in to change notification settings - Fork 685
Improve devcontainer setup #6570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,27 +3,28 @@ | |
{ | ||
"name": "C# (.NET)", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "mcr.microsoft.com/devcontainers/dotnet:1-9.0", | ||
"image": "mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm", | ||
"features": { | ||
"ghcr.io/devcontainers/features/azure-cli:1": {}, | ||
"ghcr.io/azure/azure-dev/azd:0": {}, | ||
"ghcr.io/devcontainers/features/docker-in-docker": {}, | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
"ghcr.io/devcontainers/features/powershell:1": {}, | ||
"ghcr.io/devcontainers/features/dotnet": { | ||
"additionalVersions": [ | ||
"8.0.403" | ||
] | ||
}, | ||
"ghcr.io/dapr/cli/dapr-cli": { | ||
"version": "1.12.0" | ||
} | ||
}, | ||
|
||
"hostRequirements": { | ||
"cpus": 8, | ||
"memory": "32gb", | ||
"storage": "64gb" | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mitchdenny this is maybe a problematic config. I was first surprised how fast the devcontainer is now half a year later. Actually it wasn't it was just bigger. So people that use the free tier of codespaces could easily run out of their free tier with this config, because it's overruling the defaults. (2 cores and 2GB RAM) Maybe this should stay in the documentation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is really specific to this repo. We have a few test cases that spin up a lot of containers so this is about optimizing the development experience in our repo. When .NET 9.0 ships we'll probably start experimenting with devcontainer setups outside of our repo a bit more and figure out what a good minimum config is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking we should ship a devcontainer item template as part of this work. |
||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [ | ||
15887, | ||
|
@@ -68,13 +69,13 @@ | |
"otherPortsAttributes": { | ||
"onAutoForward": "ignore" | ||
}, | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-dotnettools.csdevkit", | ||
"ms-dotnettools.vscodeintellicode-csharp", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To sum up the discussions from the old PR:
|
||
"ms-azuretools.vscode-bicep", | ||
"EditorConfig.EditorConfig", | ||
"ms-azuretools.azure-dev" | ||
], | ||
"settings": { | ||
|
@@ -84,11 +85,10 @@ | |
} | ||
}, | ||
"onCreateCommand": "dotnet restore", | ||
"postCreateCommand": "dapr init", | ||
"postStartCommand": "dotnet dev-certs https --trust" | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change docker base image to ubuntu
This is right now the only way I know to interact with windows sshd reliabel (for example if people want to use their local ssh config)