Skip to content

Conversation

paule96
Copy link
Contributor

@paule96 paule96 commented Oct 31, 2024

Description

Add the changes to the new devcontainer.json that were made in #3520 .

  • add powershell
  • add dapr
  • 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)
  • Use intellicode instead of devkit for C#
    • intellicode depends on devkit so devkit is still their
  • Add docs

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

cc @davidfowl & @mitchdenny

Microsoft Reviewers: Open in CodeFlow

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Oct 31, 2024
@davidfowl davidfowl requested a review from mitchdenny October 31, 2024 06:09
// Use 'postCreateCommand' to run commands after the container is created.
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit",
"ms-dotnettools.vscodeintellicode-csharp",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To sum up the discussions from the old PR:

  • intellicode gives the user a better IntelliSense then without
  • intelliCode depends on devkit so it's still their

@@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

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)

}
},

"hostRequirements": {
"cpus": 8,
"memory": "32gb",
"storage": "64gb"
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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.

@davidfowl davidfowl merged commit 40fb2e6 into dotnet:main Nov 1, 2024
3 of 8 checks passed
@davidfowl
Copy link
Member

Merging this in, I tried it out and it works well (also tried the dapr sample which might need more config to make the app ports be forwarded).

@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2024
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Mar 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants