Skip to content
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

#3332 add devcontainer #3520

Closed
wants to merge 13 commits into from
45 changes: 45 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
paule96 marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "C# (.NET)",
paule96 marked this conversation as resolved.
Show resolved Hide resolved
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/powershell:1": {},
"ghcr.io/dapr/cli/dapr-cli": {
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need the dapr-cli? It should only be needed if someone is actually working on the dapr extension/playground app, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes I agree. This is for me a big question mark too. On the other hand, should someone who wants to contribute, think about that stuff, or should it be just there?

I mean that's the nice thing about devcontainers that you can just start developing, because someone else took care of installing all the tools you need.

So I don't know what todo here.
If we install dapr we should maybe install other stuff too. (azure emulators, other CLIs, etc....)

Copy link
Member

Choose a reason for hiding this comment

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

I suggest just the basics in this PR and we can add more as requested/needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@danmoseley what are the basics for you? Dapr cli and Azure cli? Just Azure cli? None of both? More?

Copy link
Member

Choose a reason for hiding this comment

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

Ha, good point, this repo explicitly isn't cloud specific. @eerhardt any opinion?

Copy link
Member

Choose a reason for hiding this comment

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

I've never used the dapr cli and I work in the repo every day.

My opinion would be to not include the dapr cli or the Azure cli initially.

If someone wants these, they can customize their own container right? https://docs.github.com/codespaces/setting-your-user-preferences/personalizing-github-codespaces-for-your-account

"version": "1.12.0"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.vscodeintellicode-csharp",
"chneau.resource-monitor"
paule96 marked this conversation as resolved.
Show resolved Hide resolved
]
}
},
"remoteEnv": {
"PATH": "${containerEnv:PATH}:/home/vscode/.dapr/bin"
paule96 marked this conversation as resolved.
Show resolved Hide resolved
},

// 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": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "dapr init"

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,6 @@ node_modules/
/playground/**/.gitignore
/playground/**/azure.yaml
/playground/**/next-steps.md

# Ignore mono files on linux
.mono/
danmoseley marked this conversation as resolved.
Show resolved Hide resolved
37 changes: 34 additions & 3 deletions docs/machine-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,51 @@

Whether you want to contribute to Aspire, or just use the latest build of Aspire, these are the common pieces you need to install.

## (Windows) Install Visual Studio
## (Windows) Visual Studio

On Windows, Visual Studio contains special tooling support for .NET Aspire that you will want to have.

### Install Visual Studio

[Visual Studio 2022 version 17.9 Preview](https://visualstudio.microsoft.com/vs/preview/)

When you install, ensure that both:
* `ASP.NET and web development` Workload is checked.
* `.NET Aspire SDK` component in `Individual components` is checked.

## Install the latest .NET 8 SDK
### Install the latest .NET 8 SDK

[.NET 8 SDK](https://github.com/dotnet/installer#installers-and-binaries)

## Install Docker Desktop
### Install Docker Desktop

* [Windows](https://docs.docker.com/desktop/install/windows-install/)
* [MacOS X](https://docs.docker.com/desktop/install/mac-install/)
* [Linux](https://docs.docker.com/desktop/install/linux-install/)

## (Windows / Linux / Mac) DevContainer in VsCode

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

> Warning: This will use around 16GB of RAM, after you loaded the solution.
paule96 marked this conversation as resolved.
Show resolved Hide resolved

### Install VsCode with DevContainers Extension

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

### Install Docker Desktop

* [Windows](https://docs.docker.com/desktop/install/windows-install/)
* [MacOS X](https://docs.docker.com/desktop/install/mac-install/)
* [Linux](https://docs.docker.com/desktop/install/linux-install/)

## (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 Codesapce around 10 mins.
paule96 marked this conversation as resolved.
Show resolved Hide resolved

> Warning: With the free version of Codespaces the development expiriance is not nice. We recommend to use at least a code space with 16GB of RAM or use your local VsCode / DevContainers instance.
paule96 marked this conversation as resolved.
Show resolved Hide resolved

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

View workflow job for this annotation

GitHub Actions / lint

Blank line inside blockquote
> Information: 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 VsCode and the DevContainers.
Loading