Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)

"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"
},
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.


// 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,
Expand Down Expand Up @@ -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",
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

"ms-azuretools.vscode-bicep",
"EditorConfig.EditorConfig",
"ms-azuretools.azure-dev"
],
"settings": {
Expand All @@ -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"
}
}
21 changes: 21 additions & 0 deletions docs/machine-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,24 @@
* [Windows](https://podman.io/docs/installation#windows)
* [macOS](https://podman.io/docs/installation#macos)
* [Linux](https://podman.io/docs/installation#installing-on-linux)

## (Windows / Linux / Mac) DevContainer in VS Code

On Windows you could also use VS Code with the DevContainers extension. This requieres that you have installed a container engine.
Currently it's only tested with Docker Desktop.

> :warning: This will use around 16GB of RAM, after you loaded the solution.

### Install VS Code with DevContainers Extension

* [VS Code](https://code.visualstudio.com/Download)
* [DevContainers Extension](https://marketplace.visualstudio.com/items?itemName=ms-VS Code-remote.remote-containers)

## (Browser) Codespaces

Just start the Codespaces in your fork. The initialisation of the code space takes around 5 mins. After that you can open the solution.
This will take on the free version of Codespace around 10 mins.

> :warning: With the free version of Codespaces the development experience is not nice. We recommend using at least a Codespace with 16GB of RAM or use your local VS Code / DevContainers instance.

Check failure on line 48 in docs/machine-requirements.md

View workflow job for this annotation

GitHub Actions / lint

Blank line inside blockquote
> :warning: Currently the codespaces can not be used to try / debug the Aspire dashboard. This is a known issue. If you want to debug it, use Visual Studio or your local VS Code and the DevContainers.
Loading